toolboxv2 API Reference¶
This section provides an API reference for key components directly available from the toolboxv2 package.
Core Application & Tooling¶
toolboxv2.AppType
¶
Source code in toolboxv2/utils/system/types.py
1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 | |
debug
property
writable
¶
proxi attr
a_exit()
async
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1903 1904 | |
a_fuction_runner(function, function_data, args, kwargs)
async
¶
parameters = function_data.get('params') modular_name = function_data.get('module_name') function_name = function_data.get('func_name') mod_function_name = f"{modular_name}.{function_name}"
proxi attr
Source code in toolboxv2/utils/system/types.py
1968 1969 1970 1971 1972 1973 1974 1975 1976 | |
a_remove_mod(mod_name, spec='app', delete=True)
async
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1894 1895 | |
a_run_any(mod_function_name, backwords_compability_variabel_string_holder=None, get_results=False, tb_run_function_with_state=True, tb_run_with_specification='app', args_=None, kwargs_=None, *args, **kwargs)
async
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1990 1991 1992 1993 1994 1995 | |
a_run_function(mod_function_name, tb_run_function_with_state=True, tb_run_with_specification='app', args_=None, kwargs_=None, *args, **kwargs)
async
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1948 1949 1950 1951 1952 1953 1954 1955 1956 | |
debug_rains(e)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1787 1788 | |
disconnect(*args, **kwargs)
async
staticmethod
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1775 1776 1777 | |
execute_all_functions(m_query='', f_query='', enable_profiling=True)
async
¶
Execute all functions with parallel processing and optional profiling.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
m_query
|
str
|
Module name query filter |
''
|
f_query
|
str
|
Function name query filter |
''
|
enable_profiling
|
bool
|
Enable detailed profiling information |
True
|
Source code in toolboxv2/utils/system/types.py
2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 | |
exit()
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1897 1898 | |
exit_main(*args, **kwargs)
staticmethod
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1763 1764 1765 | |
footprint(update_tracking=True)
¶
Erfasst den aktuellen Ressourcen-Footprint der Toolbox-Instanz.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update_tracking
|
bool
|
Wenn True, aktualisiert Min/Max/Avg-Tracking |
True
|
Returns:
| Type | Description |
|---|---|
FootprintMetrics
|
FootprintMetrics mit allen erfassten Metriken |
Source code in toolboxv2/utils/system/types.py
1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 | |
fuction_runner(function, function_data, args, kwargs, t0=0.0)
¶
parameters = function_data.get('params') modular_name = function_data.get('module_name') function_name = function_data.get('func_name') mod_function_name = f"{modular_name}.{function_name}"
proxi attr
Source code in toolboxv2/utils/system/types.py
1958 1959 1960 1961 1962 1963 1964 1965 1966 | |
get_all_mods(working_dir='mods', path_to='./runtime')
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1868 1869 | |
get_autocompletion_dict()
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
2174 2175 | |
get_function(name, **kwargs)
¶
Kwargs for _get_function metadata:: return the registered function dictionary stateless: (function_data, None), 0 stateful: (function_data, higher_order_function), 0 state::boolean specification::str default app
Source code in toolboxv2/utils/system/types.py
1909 1910 1911 1912 1913 1914 1915 1916 1917 | |
get_mod(name, spec='app')
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1997 1998 | |
get_username(get_input=False, default='loot')
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
2177 2178 | |
hide_console(*args, **kwargs)
async
staticmethod
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1767 1768 1769 | |
inplace_load_instance(mod_name, loc='toolboxv2.mods.', spec='app', save=True)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1834 1835 | |
load_all_mods_in_file(working_dir='mods')
async
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1865 1866 | |
load_external_mods()
async
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1862 1863 | |
load_mod(mod_name, mlm='I', **kwargs)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1856 1857 | |
mod_online(mod_name, installed=False)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1843 1844 | |
print(text, *args, **kwargs)
staticmethod
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
2000 2001 2002 | |
print_footprint(detailed=True)
¶
Gibt den Footprint formatiert aus.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
detailed
|
bool
|
Wenn True, zeigt alle Details, sonst nur Zusammenfassung |
True
|
Returns:
| Type | Description |
|---|---|
str
|
Formatierter Footprint-String |
Source code in toolboxv2/utils/system/types.py
1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 | |
print_ok()
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1881 1882 1883 | |
reload_mod(mod_name, spec='app', is_file=True, loc='toolboxv2.mods.')
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1885 1886 | |
remove_mod(mod_name, spec='app', delete=True)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1891 1892 | |
rrun_flows(name, **kwargs)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1796 1797 | |
run_a_from_sync(function, *args)
¶
run a async fuction
Source code in toolboxv2/utils/system/types.py
1919 1920 1921 1922 | |
run_any(mod_function_name, backwords_compability_variabel_string_holder=None, get_results=False, tb_run_function_with_state=True, tb_run_with_specification='app', args_=None, kwargs_=None, *args, **kwargs)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1984 1985 1986 1987 1988 | |
run_bg_task(task)
¶
run a async fuction
Source code in toolboxv2/utils/system/types.py
1934 1935 1936 1937 | |
run_bg_task_advanced(task, *args, **kwargs)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1924 1925 1926 1927 | |
run_flows(name, **kwargs)
async
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1793 1794 | |
run_function(mod_function_name, tb_run_function_with_state=True, tb_run_with_specification='app', args_=None, kwargs_=None, *args, **kwargs)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1938 1939 1940 1941 1942 1943 1944 1945 1946 | |
run_http(mod_function_name, function_name=None, method='GET', args_=None, kwargs_=None, *args, **kwargs)
async
¶
run a function remote via http / https
Source code in toolboxv2/utils/system/types.py
1978 1979 1980 1981 1982 | |
save_autocompletion_dict()
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
2171 2172 | |
save_exit()
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1853 1854 | |
save_initialized_module(tools_class, spec)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1840 1841 | |
save_instance(instance, modular_id, spec='app', instance_type='file/application', tools_class=None)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1837 1838 | |
save_load(modname, spec='app')
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1906 1907 | |
save_registry_as_enums(directory, filename)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
2180 2181 | |
set_flows(r)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1790 1791 | |
set_logger(debug=False)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1779 1780 | |
show_console(*args, **kwargs)
async
staticmethod
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1771 1772 1773 | |
sprint(text, *args, **kwargs)
staticmethod
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
2004 2005 2006 | |
tb(name=None, mod_name='', helper='', version=None, test=True, restrict_in_virtual_mode=False, api=False, initial=False, exit_f=False, test_only=False, memory_cache=False, file_cache=False, row=False, request_as_kwarg=False, state=None, level=0, memory_cache_max_size=100, memory_cache_ttl=300, samples=None, interface=None, pre_compute=None, post_compute=None, api_methods=None, websocket_handler=None)
¶
A decorator for registering and configuring functions within a module.
This decorator is used to wrap functions with additional functionality such as caching, API conversion, and lifecycle management (initialization and exit). It also handles the registration of the function in the module's function registry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name to register the function under. Defaults to the function's own name. |
None
|
mod_name
|
str
|
The name of the module the function belongs to. |
''
|
helper
|
str
|
A helper string providing additional information about the function. |
''
|
version
|
str or None
|
The version of the function or module. |
None
|
test
|
bool
|
Flag to indicate if the function is for testing purposes. |
True
|
restrict_in_virtual_mode
|
bool
|
Flag to restrict the function in virtual mode. |
False
|
api
|
bool
|
Flag to indicate if the function is part of an API. |
False
|
initial
|
bool
|
Flag to indicate if the function should be executed at initialization. |
False
|
exit_f
|
bool
|
Flag to indicate if the function should be executed at exit. |
False
|
test_only
|
bool
|
Flag to indicate if the function should only be used for testing. |
False
|
memory_cache
|
bool
|
Flag to enable memory caching for the function. |
False
|
request_as_kwarg
|
bool
|
Flag to get request if the fuction is calld from api. |
False
|
file_cache
|
bool
|
Flag to enable file caching for the function. |
False
|
row
|
bool
|
rather to auto wrap the result in Result type default False means no row data aka result type |
False
|
state
|
bool or None
|
Flag to indicate if the function maintains state. |
None
|
level
|
int
|
The level of the function, used for prioritization or categorization. |
0
|
memory_cache_max_size
|
int
|
Maximum size of the memory cache. |
100
|
memory_cache_ttl
|
int
|
Time-to-live for the memory cache entries. |
300
|
samples
|
list or dict or None
|
Samples or examples of function usage. |
None
|
interface
|
str
|
The interface type for the function. |
None
|
pre_compute
|
callable
|
A function to be called before the main function. |
None
|
post_compute
|
callable
|
A function to be called after the main function. |
None
|
api_methods
|
list[str]
|
default ["AUTO"] (GET if not params, POST if params) , GET, POST, PUT or DELETE. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
function |
The decorated function with additional processing and registration capabilities. |
Source code in toolboxv2/utils/system/types.py
2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 | |
wait_for_bg_tasks(timeout=None)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1929 1930 1931 1932 | |
watch_mod(mod_name, spec='app', loc='toolboxv2.mods.', use_thread=True, path_name=None)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1888 1889 | |
web_context()
¶
returns the build index ( toolbox web component )
Source code in toolboxv2/utils/system/types.py
1900 1901 | |
toolboxv2.MainTool
¶
Source code in toolboxv2/utils/system/main_tool.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
__init__(*args, **kwargs)
¶
Standard constructor used for arguments pass Do not override. Use ainit instead
Source code in toolboxv2/utils/system/main_tool.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
__initobj()
async
¶
Crutch used for await after spawning
Source code in toolboxv2/utils/system/main_tool.py
174 175 176 177 178 179 180 | |
get_version()
¶
"Returns the version
Source code in toolboxv2/utils/system/main_tool.py
167 168 169 | |
webInstall(user_instance, construct_render)
¶
"Returns a web installer for the given user instance and construct render template
Source code in toolboxv2/utils/system/main_tool.py
164 165 | |
toolboxv2.get_app(from_=None, name=None, args=AppArgs().default(), app_con=None, sync=False)
¶
Source code in toolboxv2/utils/system/getting_and_closing_app.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | |
System Utilities & Configuration¶
toolboxv2.FileHandler
¶
Bases: Code
Source code in toolboxv2/utils/system/file_handler.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | |
toolboxv2.utils
¶
App
¶
Source code in toolboxv2/utils/toolbox.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 | |
disconnect(*args, **kwargs)
staticmethod
¶
proxi attr
Source code in toolboxv2/utils/toolbox.py
244 245 246 | |
exit_main(*args, **kwargs)
staticmethod
¶
proxi attr
Source code in toolboxv2/utils/toolbox.py
232 233 234 | |
get_function(name, **kwargs)
¶
Kwargs for _get_function metadata:: return the registered function dictionary stateless: (function_data, None), 0 stateful: (function_data, higher_order_function), 0 state::boolean specification::str default app
Source code in toolboxv2/utils/toolbox.py
1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 | |
hide_console(*args, **kwargs)
staticmethod
¶
proxi attr
Source code in toolboxv2/utils/toolbox.py
236 237 238 | |
init_mod(mod_name, spec='app')
¶
Initializes a module in a thread-safe manner by submitting the asynchronous initialization to the running event loop.
Source code in toolboxv2/utils/toolbox.py
625 626 627 628 629 630 631 632 | |
run(*args, request=None, running_function_coro=None, **kwargs)
¶
Run a function with support for SSE streaming in both threaded and non-threaded contexts.
Source code in toolboxv2/utils/toolbox.py
790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 | |
run_bg_task(task, *args, **kwargs)
¶
Runs a coroutine in the background without blocking the caller.
This is the primary method for "fire-and-forget" async tasks. It schedules the coroutine to run on the application's main event loop.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
Callable
|
The coroutine function to run. |
required |
*args
|
Arguments to pass to the coroutine function. |
()
|
|
**kwargs
|
Keyword arguments to pass to the coroutine function. |
{}
|
Returns:
| Type | Description |
|---|---|
Task | None
|
An asyncio.Task object representing the scheduled task, or None if |
Task | None
|
the task could not be scheduled. |
Source code in toolboxv2/utils/toolbox.py
645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 | |
run_bg_task_advanced(task, *args, **kwargs)
¶
Runs a task in a separate, dedicated background thread with its own event loop.
This is ideal for: 1. Running an async task from a synchronous context. 2. Launching a long-running, independent operation that should not interfere with the main application's event loop.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
Callable
|
The function to run (can be sync or async). |
required |
*args
|
Arguments for the task. |
()
|
|
**kwargs
|
Keyword arguments for the task. |
{}
|
Returns:
| Type | Description |
|---|---|
Thread
|
The threading.Thread object managing the background execution. |
Source code in toolboxv2/utils/toolbox.py
700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 | |
show_console(*args, **kwargs)
staticmethod
¶
proxi attr
Source code in toolboxv2/utils/toolbox.py
240 241 242 | |
tb(name=None, mod_name='', helper='', version=None, test=True, restrict_in_virtual_mode=False, api=False, initial=False, exit_f=False, test_only=False, memory_cache=False, file_cache=False, request_as_kwarg=False, row=False, state=None, level=-1, memory_cache_max_size=100, memory_cache_ttl=300, samples=None, interface=None, pre_compute=None, post_compute=None, api_methods=None, websocket_handler=None)
¶
A decorator for registering and configuring functions within a module.
This decorator is used to wrap functions with additional functionality such as caching, API conversion, and lifecycle management (initialization and exit). It also handles the registration of the function in the module's function registry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name to register the function under. Defaults to the function's own name. |
None
|
mod_name
|
str
|
The name of the module the function belongs to. |
''
|
helper
|
str
|
A helper string providing additional information about the function. |
''
|
version
|
str or None
|
The version of the function or module. |
None
|
test
|
bool
|
Flag to indicate if the function is for testing purposes. |
True
|
restrict_in_virtual_mode
|
bool
|
Flag to restrict the function in virtual mode. |
False
|
api
|
bool
|
Flag to indicate if the function is part of an API. |
False
|
initial
|
bool
|
Flag to indicate if the function should be executed at initialization. |
False
|
exit_f
|
bool
|
Flag to indicate if the function should be executed at exit. |
False
|
test_only
|
bool
|
Flag to indicate if the function should only be used for testing. |
False
|
memory_cache
|
bool
|
Flag to enable memory caching for the function. |
False
|
request_as_kwarg
|
bool
|
Flag to get request if the fuction is calld from api. |
False
|
file_cache
|
bool
|
Flag to enable file caching for the function. |
False
|
row
|
bool
|
rather to auto wrap the result in Result type default False means no row data aka result type |
False
|
state
|
bool or None
|
Flag to indicate if the function maintains state. |
None
|
level
|
int
|
The level of the function, used for prioritization or categorization. |
-1
|
memory_cache_max_size
|
int
|
Maximum size of the memory cache. |
100
|
memory_cache_ttl
|
int
|
Time-to-live for the memory cache entries. |
300
|
samples
|
list or dict or None
|
Samples or examples of function usage. |
None
|
interface
|
str
|
The interface type for the function. |
None
|
pre_compute
|
callable
|
A function to be called before the main function. |
None
|
post_compute
|
callable
|
A function to be called after the main function. |
None
|
api_methods
|
list[str]
|
default ["AUTO"] (GET if not params, POST if params) , GET, POST, PUT or DELETE. |
None
|
websocket_handler
|
str
|
The name of the websocket handler to use. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
function |
The decorated function with additional processing and registration capabilities. |
Source code in toolboxv2/utils/toolbox.py
2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 | |
wait_for_bg_tasks(timeout=None)
¶
Wait for all background tasks to complete.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timeout
|
Maximum time to wait (in seconds) for all tasks to complete. None means wait indefinitely. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
bool |
True if all tasks completed, False if timeout occurred |
Source code in toolboxv2/utils/toolbox.py
767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 | |
ws_broadcast(channel_id, payload, source_conn_id='python_broadcast')
async
¶
Sendet eine Nachricht asynchron an alle Clients in einem Kanal/Raum.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
channel_id
|
str
|
Der Kanal, an den gesendet werden soll. |
required |
payload
|
dict
|
Ein Dictionary, das als JSON gesendet wird. |
required |
source_conn_id
|
optional
|
Die ID der ursprünglichen Verbindung, um Echos zu vermeiden. |
'python_broadcast'
|
Source code in toolboxv2/utils/toolbox.py
2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 | |
ws_send(conn_id, payload)
async
¶
Sendet eine Nachricht asynchron an eine einzelne WebSocket-Verbindung.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
conn_id
|
str
|
Die eindeutige ID der Zielverbindung. |
required |
payload
|
dict
|
Ein Dictionary, das als JSON gesendet wird. |
required |
Source code in toolboxv2/utils/toolbox.py
2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 | |
Code
¶
Source code in toolboxv2/utils/security/cryp.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 | |
decrypt_asymmetric(encrypted_text_hex, private_key_str)
staticmethod
¶
Entschlüsselt einen Text mit einem gegebenen privaten Schlüssel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
encrypted_text_hex
|
str
|
Der verschlüsselte Text als Hex-String. |
required |
private_key_str
|
str
|
Der private Schlüssel als String. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Der entschlüsselte Text. |
Source code in toolboxv2/utils/security/cryp.py
336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 | |
decrypt_symmetric(encrypted_text, key, to_str=True, mute=False)
staticmethod
¶
Entschlüsselt einen Text mit einem gegebenen symmetrischen Schlüssel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
encrypted_text
|
str
|
Der zu entschlüsselnde Text. |
required |
key
|
str
|
Der symmetrische Schlüssel. |
required |
to_str
|
bool
|
default true returns str if false returns bytes |
True
|
Returns: str: Der entschlüsselte Text.
Source code in toolboxv2/utils/security/cryp.py
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | |
encrypt_asymmetric(text, public_key_str)
staticmethod
¶
Verschlüsselt einen Text mit einem gegebenen öffentlichen Schlüssel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Der zu verschlüsselnde Text. |
required |
public_key_str
|
str
|
Der öffentliche Schlüssel als String oder im pem format. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Der verschlüsselte Text. |
Source code in toolboxv2/utils/security/cryp.py
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | |
encrypt_symmetric(text, key)
staticmethod
¶
Verschlüsselt einen Text mit einem gegebenen symmetrischen Schlüssel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Der zu verschlüsselnde Text. |
required |
key
|
str
|
Der symmetrische Schlüssel. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Der verschlüsselte Text. |
Source code in toolboxv2/utils/security/cryp.py
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | |
generate_asymmetric_keys()
staticmethod
¶
Generiert ein Paar von öffentlichen und privaten Schlüsseln für die asymmetrische Verschlüsselung.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
seed
|
int
|
Ein optionaler Seed-Wert. Standardmäßig None. |
required |
Returns:
| Type | Description |
|---|---|
(str, str)
|
Ein Tupel aus öffentlichem und privatem Schlüssel. |
Source code in toolboxv2/utils/security/cryp.py
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | |
generate_random_string(length)
staticmethod
¶
Generiert eine zufällige Zeichenkette der angegebenen Länge.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
length
|
int
|
Die Länge der zu generierenden Zeichenkette. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Die generierte Zeichenkette. |
Source code in toolboxv2/utils/security/cryp.py
81 82 83 84 85 86 87 88 89 90 91 92 | |
generate_seed()
staticmethod
¶
Erzeugt eine zufällige Zahl als Seed.
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Eine zufällige Zahl. |
Source code in toolboxv2/utils/security/cryp.py
114 115 116 117 118 119 120 121 122 | |
generate_symmetric_key(as_str=True)
staticmethod
¶
Generiert einen Schlüssel für die symmetrische Verschlüsselung.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str or bytes
|
Der generierte Schlüssel. |
Source code in toolboxv2/utils/security/cryp.py
140 141 142 143 144 145 146 147 148 149 150 151 | |
load_keys_from_files(directory='keys')
staticmethod
¶
Lädt die Schlüssel aus den Dateien. Der private Schlüssel wird mit dem Device Key entschlüsselt.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
directory
|
str
|
Das Verzeichnis, aus dem die Schlüssel geladen werden sollen |
'keys'
|
Returns:
| Type | Description |
|---|---|
(str, str)
|
Ein Tupel aus öffentlichem und privatem Schlüssel |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
Wenn die Schlüsseldateien nicht gefunden werden können |
Source code in toolboxv2/utils/security/cryp.py
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | |
one_way_hash(text, salt='', pepper='')
staticmethod
¶
Erzeugt einen Hash eines gegebenen Textes mit Salt, Pepper und optional einem Seed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Der zu hashende Text. |
required |
salt
|
str
|
Der Salt-Wert. |
''
|
pepper
|
str
|
Der Pepper-Wert. |
''
|
seed
|
int
|
Ein optionaler Seed-Wert. Standardmäßig None. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Der resultierende Hash-Wert. |
Source code in toolboxv2/utils/security/cryp.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | |
pem_to_public_key(pem_key)
staticmethod
¶
Konvertiert einen PEM-kodierten öffentlichen Schlüssel in ein PublicKey-Objekt.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pem_key
|
str
|
Der PEM-kodierte öffentliche Schlüssel. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
PublicKey |
Das PublicKey-Objekt. |
Source code in toolboxv2/utils/security/cryp.py
435 436 437 438 439 440 441 442 443 444 445 446 447 | |
public_key_to_pem(public_key)
staticmethod
¶
Konvertiert ein PublicKey-Objekt in einen PEM-kodierten String.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
public_key
|
PublicKey
|
Das PublicKey-Objekt. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
Der PEM-kodierte öffentliche Schlüssel. |
Source code in toolboxv2/utils/security/cryp.py
449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 | |
save_keys_to_files(public_key, private_key, directory='keys')
staticmethod
¶
Speichert die generierten Schlüssel in separate Dateien. Der private Schlüssel wird mit dem Device Key verschlüsselt.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
public_key
|
str
|
Der öffentliche Schlüssel im PEM-Format |
required |
private_key
|
str
|
Der private Schlüssel im PEM-Format |
required |
directory
|
str
|
Das Verzeichnis, in dem die Schlüssel gespeichert werden sollen |
'keys'
|
Source code in toolboxv2/utils/security/cryp.py
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 | |
MainTool
¶
Source code in toolboxv2/utils/system/main_tool.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
__init__(*args, **kwargs)
¶
Standard constructor used for arguments pass Do not override. Use ainit instead
Source code in toolboxv2/utils/system/main_tool.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
__initobj()
async
¶
Crutch used for await after spawning
Source code in toolboxv2/utils/system/main_tool.py
174 175 176 177 178 179 180 | |
get_version()
¶
"Returns the version
Source code in toolboxv2/utils/system/main_tool.py
167 168 169 | |
webInstall(user_instance, construct_render)
¶
"Returns a web installer for the given user instance and construct render template
Source code in toolboxv2/utils/system/main_tool.py
164 165 | |
Result
¶
Source code in toolboxv2/utils/system/types.py
626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 | |
__class_getitem__(item)
¶
Enable Result[Type] syntax
Source code in toolboxv2/utils/system/types.py
643 644 645 646 647 648 649 650 651 652 653 | |
binary(data, content_type='application/octet-stream', download_name=None, info='OK', interface=ToolBoxInterfaces.remote)
classmethod
¶
Create a binary data response Result.
Source code in toolboxv2/utils/system/types.py
1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 | |
cast_to(target_type)
¶
Cast result to different type
Source code in toolboxv2/utils/system/types.py
738 739 740 741 742 743 744 745 746 747 748 | |
file(data, filename, content_type=None, info='OK', interface=ToolBoxInterfaces.remote)
classmethod
¶
Create a file download response Result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
File data as bytes or base64 string |
required | |
filename
|
Name of the file for download |
required | |
content_type
|
MIME type of the file (auto-detected if None) |
None
|
|
info
|
Response info text |
'OK'
|
|
interface
|
Target interface |
remote
|
Returns:
| Type | Description |
|---|---|
|
Result object configured for file download |
Source code in toolboxv2/utils/system/types.py
1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 | |
get_type_info()
¶
Get the generic type information
Source code in toolboxv2/utils/system/types.py
750 751 752 | |
is_typed()
¶
Check if result has type information
Source code in toolboxv2/utils/system/types.py
754 755 756 | |
json(data, info='OK', interface=ToolBoxInterfaces.remote, exec_code=0, status_code=None)
classmethod
¶
Create a JSON response Result.
Source code in toolboxv2/utils/system/types.py
970 971 972 973 974 975 976 977 978 979 980 981 982 983 | |
redirect(url, status_code=302, info='Redirect', interface=ToolBoxInterfaces.remote)
classmethod
¶
Create a redirect response.
Source code in toolboxv2/utils/system/types.py
1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 | |
sse(stream_generator, info='OK', interface=ToolBoxInterfaces.remote, cleanup_func=None)
classmethod
¶
Create an Server-Sent Events (SSE) streaming response Result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stream_generator
|
Any
|
A source yielding individual data items. This can be an async generator, sync generator, iterable, or a single item. Each item will be formatted as an SSE event. |
required |
info
|
str
|
Optional help text for the Result. |
'OK'
|
interface
|
ToolBoxInterfaces
|
Optional ToolBoxInterface to target. |
remote
|
cleanup_func
|
Callable[[], None] | Callable[[], T] | Callable[[], AsyncGenerator[T, None]] | None
|
Optional cleanup function to run when the stream ends or is cancelled. |
None
|
#http_headers
|
Optional dictionary of custom HTTP headers for the SSE response. |
required |
Returns:
| Type | Description |
|---|---|
|
A Result object configured for SSE streaming. |
Source code in toolboxv2/utils/system/types.py
929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 | |
stream(stream_generator, content_type='text/event-stream', headers=None, info='OK', interface=ToolBoxInterfaces.remote, cleanup_func=None)
classmethod
¶
Create a streaming response Result. Handles SSE and other stream types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stream_generator
|
Any
|
Any stream source (async generator, sync generator, iterable, or single item). |
required |
content_type
|
str
|
Content-Type header (default: text/event-stream for SSE). |
'text/event-stream'
|
headers
|
dict | None
|
Additional HTTP headers for the response. |
None
|
info
|
str
|
Help text for the result. |
'OK'
|
interface
|
ToolBoxInterfaces
|
Interface to send data to. |
remote
|
cleanup_func
|
Callable[[], None] | Callable[[], T] | Callable[[], AsyncGenerator[T, None]] | None
|
Optional function for cleanup. |
None
|
Returns:
| Type | Description |
|---|---|
|
A Result object configured for streaming. |
Source code in toolboxv2/utils/system/types.py
851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 | |
text(text_data, content_type='text/plain', exec_code=None, status=200, info='OK', interface=ToolBoxInterfaces.remote, headers=None)
classmethod
¶
Create a text response Result with specific content type.
Source code in toolboxv2/utils/system/types.py
985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 | |
typed_aget(key=None, default=None)
async
¶
Async get data with type validation
Source code in toolboxv2/utils/system/types.py
667 668 669 670 671 672 673 674 675 676 | |
typed_get(key=None, default=None)
¶
Get data with type validation
Source code in toolboxv2/utils/system/types.py
655 656 657 658 659 660 661 662 663 664 665 | |
typed_json(data, info='OK', interface=ToolBoxInterfaces.remote, exec_code=0, status_code=None)
classmethod
¶
Create JSON result with type information
Source code in toolboxv2/utils/system/types.py
718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 | |
typed_ok(data, data_info='', info='OK', interface=ToolBoxInterfaces.native)
classmethod
¶
Create OK result with type information
Source code in toolboxv2/utils/system/types.py
705 706 707 708 709 710 711 712 713 714 715 716 | |
Singleton
¶
Singleton metaclass for ensuring only one instance of a class.
Source code in toolboxv2/utils/singelton_class.py
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
Spinner
¶
Enhanced Spinner with tqdm-like line rendering.
Source code in toolboxv2/utils/extras/Style.py
578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 | |
__enter__()
¶
Start the spinner.
Source code in toolboxv2/utils/extras/Style.py
644 645 646 647 648 649 | |
__exit__(exc_type, exc_value, exc_traceback)
¶
Stop the spinner.
Source code in toolboxv2/utils/extras/Style.py
651 652 653 654 655 656 657 658 | |
__init__(message='Loading...', delay=0.1, symbols=None, count_down=False, time_in_s=0)
¶
Initialize spinner with flexible configuration.
Source code in toolboxv2/utils/extras/Style.py
592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 | |
TBEF
¶
Automatic generated by ToolBox v = 0.1.22
clis
¶
api
¶
cleanup_build_files()
¶
Clean build artifacts
Source code in toolboxv2/utils/clis/api.py
513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 | |
cli_api_runner()
¶
Main CLI entry point
Source code in toolboxv2/utils/clis/api.py
702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 | |
ensure_socket_and_fd_file_posix(host, port, backlog, fd_file_path)
¶
Create socket and FD file for POSIX zero-downtime updates
Source code in toolboxv2/utils/clis/api.py
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | |
get_executable_name_with_extension(base_name=DEFAULT_EXECUTABLE_NAME)
¶
Get platform-specific executable name
Source code in toolboxv2/utils/clis/api.py
59 60 61 62 63 | |
get_executable_path()
¶
Find the release executable in standard locations
Source code in toolboxv2/utils/clis/api.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |
handle_build()
¶
Build the Rust project
Source code in toolboxv2/utils/clis/api.py
451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 | |
handle_debug()
¶
Run server in debug mode with hot reload
Source code in toolboxv2/utils/clis/api.py
585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 | |
is_process_running(pid)
¶
Check if process is running
Source code in toolboxv2/utils/clis/api.py
113 114 115 116 117 118 119 120 | |
manage_server(action, executable_path=None, version_str='unknown', use_posix_zdt=False)
¶
Main server management dispatcher
Source code in toolboxv2/utils/clis/api.py
651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 | |
read_server_state(state_file=SERVER_STATE_FILE)
¶
Read server state from file
Source code in toolboxv2/utils/clis/api.py
85 86 87 88 89 90 91 92 93 94 | |
remove_release_executable()
¶
Remove release executable
Source code in toolboxv2/utils/clis/api.py
551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 | |
show_server_status(use_posix_zdt)
¶
Display current server status
Source code in toolboxv2/utils/clis/api.py
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 | |
start_new_server(executable_path, version_str, use_posix_zdt)
¶
Start a new server instance
Source code in toolboxv2/utils/clis/api.py
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 | |
start_rust_server_posix(executable_path, persistent_fd)
¶
Start Rust server on POSIX with socket FD passing
Source code in toolboxv2/utils/clis/api.py
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | |
start_rust_server_windows(executable_path)
¶
Start Rust server on Windows
Source code in toolboxv2/utils/clis/api.py
219 220 221 222 223 224 225 226 227 228 229 230 | |
stop_process(pid, timeout=10)
¶
Stop process gracefully with timeout
Source code in toolboxv2/utils/clis/api.py
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | |
update_server(new_executable_path, new_version, use_posix_zdt)
¶
High-level update function
Source code in toolboxv2/utils/clis/api.py
391 392 393 394 395 396 397 398 399 400 401 402 | |
update_server_graceful_restart(new_executable_path, new_version)
¶
Perform graceful restart update
Source code in toolboxv2/utils/clis/api.py
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 | |
update_server_posix(new_executable_path, new_version)
¶
Perform POSIX zero-downtime update
Source code in toolboxv2/utils/clis/api.py
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | |
write_server_state(pid, server_version, executable_path, state_file=SERVER_STATE_FILE)
¶
Write server state to file
Source code in toolboxv2/utils/clis/api.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 | |
cli_printing
¶
Colors
¶
ANSI color codes for terminal styling
Source code in toolboxv2/utils/clis/cli_printing.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | |
main()
¶
Entry point for running visual test directly
Source code in toolboxv2/utils/clis/cli_printing.py
437 438 439 | |
print_box_content(text, style='', width=76, auto_wrap=True)
¶
Print content with minimal styled prefix
Source code in toolboxv2/utils/clis/cli_printing.py
143 144 145 146 147 148 149 150 151 152 153 154 155 156 | |
print_box_footer(width=76)
¶
Print a minimal footer
Source code in toolboxv2/utils/clis/cli_printing.py
136 137 138 | |
print_box_header(title, icon='ℹ', width=76)
¶
Print a minimal styled header
Source code in toolboxv2/utils/clis/cli_printing.py
129 130 131 132 133 | |
print_code_block(code, language='text', width=76, show_line_numbers=False)
¶
Print code block with minimal syntax highlighting
Source code in toolboxv2/utils/clis/cli_printing.py
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | |
print_separator(char='─', width=76)
¶
Print a minimal separator line
Source code in toolboxv2/utils/clis/cli_printing.py
254 255 256 | |
print_status(message, status='info')
¶
Print a minimal status message with icon and color
Source code in toolboxv2/utils/clis/cli_printing.py
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | |
print_table_header(columns, widths)
¶
Print a table header with columns
Source code in toolboxv2/utils/clis/cli_printing.py
261 262 263 264 265 266 267 268 269 270 | |
print_table_row(values, widths, styles=None)
¶
Print a table row
Source code in toolboxv2/utils/clis/cli_printing.py
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | |
run_visual_test()
¶
Visual test for all UI components - for alignment and testing
Source code in toolboxv2/utils/clis/cli_printing.py
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 | |
db_cli_manager
¶
ClusterManager
¶
Manages a cluster of r_blob_db instances defined in a config file.
Source code in toolboxv2/utils/clis/db_cli_manager.py
371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 | |
get_instances(instance_id=None)
¶Returns a list of instances to operate on.
Source code in toolboxv2/utils/clis/db_cli_manager.py
406 407 408 409 410 411 412 | |
health_check_all(instance_id=None)
¶Perform health check on all instances
Source code in toolboxv2/utils/clis/db_cli_manager.py
496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 | |
start_all(executable_path, version, instance_id=None)
¶Start all instances
Source code in toolboxv2/utils/clis/db_cli_manager.py
414 415 416 417 418 419 420 421 422 423 424 425 426 | |
status_all(instance_id=None, silent=False)
¶Show status of all instances
Source code in toolboxv2/utils/clis/db_cli_manager.py
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 | |
stop_all(instance_id=None)
¶Stop all instances
Source code in toolboxv2/utils/clis/db_cli_manager.py
428 429 430 431 432 433 434 435 436 437 438 439 440 | |
update_all_rolling(new_executable_path, new_version, instance_id=None)
¶Performs a zero-downtime rolling update of the cluster.
Source code in toolboxv2/utils/clis/db_cli_manager.py
543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 | |
DBInstanceManager
¶
Manages a single r_blob_db instance.
Source code in toolboxv2/utils/clis/db_cli_manager.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 | |
delete_blob(blob_id)
¶Delete a specific blob
Source code in toolboxv2/utils/clis/db_cli_manager.py
306 307 308 309 310 311 312 313 314 315 316 317 318 | |
get_blob_data(blob_id)
¶Get data from a specific blob
Source code in toolboxv2/utils/clis/db_cli_manager.py
271 272 273 274 275 276 277 278 279 280 281 282 283 | |
get_blob_list()
¶Get list of all blobs from this instance
Source code in toolboxv2/utils/clis/db_cli_manager.py
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | |
get_health()
¶Performs a health check on the running instance.
Source code in toolboxv2/utils/clis/db_cli_manager.py
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | |
get_stats()
¶Get detailed statistics from this instance
Source code in toolboxv2/utils/clis/db_cli_manager.py
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 | |
is_running()
¶Checks if the process associated with this instance is running.
Source code in toolboxv2/utils/clis/db_cli_manager.py
102 103 104 105 | |
read_state()
¶Reads the PID and version from the instance's state file.
Source code in toolboxv2/utils/clis/db_cli_manager.py
84 85 86 87 88 89 90 91 92 93 | |
start(executable_path, version)
¶Starts the instance process and detaches, redirecting output to a log file.
Source code in toolboxv2/utils/clis/db_cli_manager.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | |
stop(timeout=10)
¶Stops the instance process gracefully.
Source code in toolboxv2/utils/clis/db_cli_manager.py
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | |
write_state(pid, version)
¶Writes the PID and version to the state file.
Source code in toolboxv2/utils/clis/db_cli_manager.py
95 96 97 98 99 100 | |
DataDiscovery
¶
Interactive data discovery and manipulation interface
Source code in toolboxv2/utils/clis/db_cli_manager.py
591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 | |
confirm_delete_blob()
¶Confirm blob deletion with user
Source code in toolboxv2/utils/clis/db_cli_manager.py
1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 | |
delete_current_blob()
¶Delete the currently selected blob
Source code in toolboxv2/utils/clis/db_cli_manager.py
1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 | |
export_current_blob(data)
¶Export blob data to file
Source code in toolboxv2/utils/clis/db_cli_manager.py
1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 | |
format_size(size_bytes)
staticmethod
¶Format byte size to human readable
Source code in toolboxv2/utils/clis/db_cli_manager.py
1099 1100 1101 1102 1103 1104 1105 1106 | |
go_back()
¶Navigate back in the view hierarchy
Source code in toolboxv2/utils/clis/db_cli_manager.py
1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 | |
load_blobs()
¶Load blob list from selected instance
Source code in toolboxv2/utils/clis/db_cli_manager.py
718 719 720 721 722 723 724 | |
run()
async
¶Run interactive discovery session
Source code in toolboxv2/utils/clis/db_cli_manager.py
602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 | |
show_blob_detail()
¶Show detailed view of a blob with keyboard navigation
Source code in toolboxv2/utils/clis/db_cli_manager.py
878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 | |
show_blobs()
¶Show blob list with keyboard navigation
Source code in toolboxv2/utils/clis/db_cli_manager.py
726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 | |
show_instances()
¶Show instance selection menu with keyboard navigation
Source code in toolboxv2/utils/clis/db_cli_manager.py
623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 | |
cli_db_runner()
async
¶
The main entry point for the CLI application.
Source code in toolboxv2/utils/clis/db_cli_manager.py
1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 | |
get_executable_path(base_name=EXECUTABLE_NAME, update=False)
¶
Finds the release executable in standard locations.
Source code in toolboxv2/utils/clis/db_cli_manager.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 | |
handle_build()
¶
Build the Rust project
Source code in toolboxv2/utils/clis/db_cli_manager.py
1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 | |
handle_clean()
¶
Clean build artifacts
Source code in toolboxv2/utils/clis/db_cli_manager.py
1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 | |
handle_discover(manager)
async
¶
Handle interactive data discovery
Source code in toolboxv2/utils/clis/db_cli_manager.py
1175 1176 1177 1178 | |
tb_lang_cli
¶
cli_tbx_main()
¶
Main entry point for TB Language CLI
Source code in toolboxv2/utils/clis/tb_lang_cli.py
750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 | |
detect_shell()
¶
Detect shell for running commands
Source code in toolboxv2/utils/clis/tb_lang_cli.py
105 106 107 108 109 110 | |
get_executable_path()
¶
Find the compiled TB executable
Source code in toolboxv2/utils/clis/tb_lang_cli.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | |
get_project_dir()
¶
Get the TB language project directory
Source code in toolboxv2/utils/clis/tb_lang_cli.py
82 83 84 | |
get_tb_root()
¶
Get the toolbox root directory
Source code in toolboxv2/utils/clis/tb_lang_cli.py
73 74 75 76 77 78 79 | |
handle_build(release=True, target='native', export_bin=True)
¶
Build the TB language executable for various targets
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
release
|
bool
|
Build in release mode (default: True) |
True
|
target
|
str
|
Build target - native, windows, linux, macos, android, ios, all (default: native) |
'native'
|
export_bin
|
bool
|
Export binaries to bin directory (default: True) |
True
|
Source code in toolboxv2/utils/clis/tb_lang_cli.py
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 | |
handle_check(file_path)
¶
Check a TB program without executing
Source code in toolboxv2/utils/clis/tb_lang_cli.py
563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 | |
handle_clean()
¶
Clean build artifacts
Source code in toolboxv2/utils/clis/tb_lang_cli.py
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 | |
handle_compile(input_file, output_file, target='native')
¶
Compile a TB program
Source code in toolboxv2/utils/clis/tb_lang_cli.py
508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 | |
handle_examples()
¶
Run example programs
Source code in toolboxv2/utils/clis/tb_lang_cli.py
657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 | |
handle_ide_extension(args)
¶
Handle language IDE extension operations
Source code in toolboxv2/utils/clis/tb_lang_cli.py
363 364 365 | |
handle_info()
¶
Show system information
Source code in toolboxv2/utils/clis/tb_lang_cli.py
700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 | |
handle_init(project_name)
¶
Initialize a new TB project
Source code in toolboxv2/utils/clis/tb_lang_cli.py
585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 | |
handle_repl()
¶
Start TB REPL
Source code in toolboxv2/utils/clis/tb_lang_cli.py
544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 | |
handle_run(file_path, mode='jit', watch=False)
¶
Run a TB program
Source code in toolboxv2/utils/clis/tb_lang_cli.py
467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 | |
handle_system_support(args)
¶
Handle system support operations
Source code in toolboxv2/utils/clis/tb_lang_cli.py
359 360 361 | |
handle_test_examples(args)
¶
Handle TB language testing and examples
Source code in toolboxv2/utils/clis/tb_lang_cli.py
367 368 369 | |
tcm_p2p_cli
¶
ChatListener
¶
Background thread to listen for new chat messages.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 | |
ChatMessage
dataclass
¶
Represents a chat message with encryption support.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | |
ChatRoom
dataclass
¶
Represents a P2P chat room with E2E encryption.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | |
CryptoManager
¶
Handles all E2E encryption operations.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | |
decrypt_bytes(encrypted_data, key)
staticmethod
¶Decrypt binary data directly (for audio/files).
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
194 195 196 197 198 | |
decrypt_file(encrypted_data, key, output_path)
staticmethod
¶Decrypt file content.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
180 181 182 183 184 185 186 | |
decrypt_message(encrypted_message, key)
staticmethod
¶Decrypt message content.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
167 168 169 170 171 | |
encrypt_bytes(data, key)
staticmethod
¶Encrypt binary data directly (for audio/files).
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
188 189 190 191 192 | |
encrypt_file(file_path, key)
staticmethod
¶Encrypt file content.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
173 174 175 176 177 178 | |
encrypt_message(message, key)
staticmethod
¶Encrypt message content.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
161 162 163 164 165 | |
generate_room_key(room_id, password)
staticmethod
¶Generate encryption key for room.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
149 150 151 152 153 154 155 156 157 158 159 | |
EnhancedInstanceManager
¶
Enhanced instance manager with chat integration.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 | |
generate_config(mode, config_data)
¶Generate config.toml for instance.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 | |
is_running()
¶Check if instance is running.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
1084 1085 1086 1087 | |
read_state()
¶Read instance state.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
1068 1069 1070 1071 1072 1073 1074 1075 1076 | |
start(executable_path, mode, config_data, chat_room=None)
¶Start instance.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 | |
stop(timeout=10)
¶Stop instance.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 | |
write_state(state_data)
¶Write instance state.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
1078 1079 1080 1081 1082 | |
FileTransferManager
¶
Manages P2P file transfers with E2E encryption.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | |
prepare_file(file_path)
¶Prepare file for transfer (encrypt and chunk).
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | |
receive_file(transfer_id, file_name)
¶Receive and decrypt file.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | |
InteractiveP2PCLI
¶
Interactive P2P CLI with modern ToolBox-style interface.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 | |
chat_menu()
¶Interactive chat menu.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 | |
clear_screen()
¶Clear terminal screen.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
1199 1200 1201 | |
p2p_menu()
¶P2P configuration menu.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 | |
print_header()
¶Print main header.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
1203 1204 1205 1206 1207 1208 1209 1210 | |
print_menu()
¶Print main menu.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 | |
run()
¶Main application loop.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 | |
settings_menu()
¶Settings menu.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 | |
status_menu(do_clear=True)
¶Status and monitoring menu.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 | |
P2PChatManager
¶
Manages E2E encrypted chat rooms with file and voice support.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 | |
create_room(name, password, max_participants=10, voice_enabled=False, private=False)
¶Create a new chat room.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 | |
get_messages(room_id, password, limit=50)
¶Get decrypted messages from room.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 | |
join_room(room_id, password)
¶Join an existing chat room.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 | |
leave_room(room_id)
¶Leave a chat room.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 | |
list_rooms(show_all=False)
¶List available rooms for user.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 | |
lock_room(room_id)
¶Lock a room to prevent new participants.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 | |
receive_file(room_id, transfer_id, file_name)
¶Receive and decrypt file from room.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 | |
send_file(room_id, file_path, password)
¶Send encrypted file to room.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 | |
send_message(room_id, content, password)
¶Send encrypted text message to room.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 | |
P2PConnection
dataclass
¶
Represents a P2P connection configuration.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
133 134 135 136 137 138 139 140 141 | |
VoiceChatManager
¶
Manages P2P voice chat with live streaming and speaker detection.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 | |
calculate_rms(audio_data)
¶Calculate RMS (Root Mean Square) for voice activity detection.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
283 284 285 286 287 288 289 290 291 | |
cleanup()
¶Cleanup voice resources.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 | |
connect_to_voice_server(host, port)
¶Connect to voice relay server.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
411 412 413 414 415 416 417 418 419 420 | |
get_current_speaker()
¶Get username of current speaker.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
583 584 585 | |
start_recording_stream()
¶Start streaming microphone input to server.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 | |
start_voice_server(port=0)
¶Start voice relay server for this room.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | |
stop_recording()
¶Stop recording stream.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
579 580 581 | |
cli_tcm_runner()
¶
Main CLI entry point.
Source code in toolboxv2/utils/clis/tcm_p2p_cli.py
2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 | |
user_dashboard
¶
interactive_user_dashboard()
async
¶
Modern interactive user dashboard and mini CLI
Source code in toolboxv2/utils/clis/user_dashboard.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 | |
venv_runner
¶
Modern Package Manager Runner - Supporting conda, uv, and native Python
BasePackageManager
¶
Base class for package managers.
Source code in toolboxv2/utils/clis/venv_runner.py
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 | |
CommandRunner
¶
Enhanced command runner with better output handling.
Source code in toolboxv2/utils/clis/venv_runner.py
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | |
run(command, live=True, capture=False)
¶Execute command with optional live output.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
command
|
str
|
Command to execute |
required |
live
|
bool
|
Stream output in real-time |
True
|
capture
|
bool
|
Capture and return output |
False
|
Returns:
| Type | Description |
|---|---|
Tuple[bool, Optional[str]]
|
Tuple of (success, output) |
Source code in toolboxv2/utils/clis/venv_runner.py
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | |
CondaManager
¶
Conda package manager implementation.
Source code in toolboxv2/utils/clis/venv_runner.py
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 | |
NativeManager
¶
Native Python (venv + pip) manager implementation.
Source code in toolboxv2/utils/clis/venv_runner.py
474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 | |
PackageManager
¶
Supported package managers.
Source code in toolboxv2/utils/clis/venv_runner.py
24 25 26 27 28 | |
UVManager
¶
UV package manager implementation.
Source code in toolboxv2/utils/clis/venv_runner.py
407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 | |
create_manager(pm_type)
¶
Create appropriate package manager.
Source code in toolboxv2/utils/clis/venv_runner.py
569 570 571 572 573 574 575 576 577 578 | |
create_parser()
¶
Create modern CLI parser.
Source code in toolboxv2/utils/clis/venv_runner.py
617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 | |
detect_package_manager()
¶
Auto-detect available package manager.
Source code in toolboxv2/utils/clis/venv_runner.py
64 65 66 67 68 69 70 71 | |
discover_environments()
¶
Discover existing environments from all package managers.
Source code in toolboxv2/utils/clis/venv_runner.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | |
get_encoding()
¶
Get system encoding with fallback.
Source code in toolboxv2/utils/clis/venv_runner.py
74 75 76 77 78 79 | |
handle_create(args, manager)
¶
Handle environment creation.
Source code in toolboxv2/utils/clis/venv_runner.py
738 739 740 741 742 743 744 745 746 747 748 | |
handle_delete(args, manager)
¶
Handle environment deletion.
Source code in toolboxv2/utils/clis/venv_runner.py
751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 | |
handle_discover(args, manager)
¶
Handle environment discovery.
Source code in toolboxv2/utils/clis/venv_runner.py
581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 | |
handle_exec(args, manager)
¶
Handle command execution.
Source code in toolboxv2/utils/clis/venv_runner.py
865 866 867 868 869 870 871 872 873 | |
handle_info(args, manager)
¶
Handle info display.
Source code in toolboxv2/utils/clis/venv_runner.py
900 901 902 903 904 905 906 907 908 909 910 911 | |
handle_install(args, manager)
¶
Handle package installation.
Source code in toolboxv2/utils/clis/venv_runner.py
793 794 795 796 797 798 799 800 801 802 803 | |
handle_list(args, manager)
¶
Handle environment listing.
Source code in toolboxv2/utils/clis/venv_runner.py
774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 | |
handle_packages(args, manager)
¶
Handle package listing.
Source code in toolboxv2/utils/clis/venv_runner.py
832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 | |
handle_registry(args, manager)
¶
Handle registry creation.
Source code in toolboxv2/utils/clis/venv_runner.py
876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 | |
handle_run(args, manager)
¶
Handle script execution.
Source code in toolboxv2/utils/clis/venv_runner.py
854 855 856 857 858 859 860 861 862 | |
handle_update(args, manager)
¶
Handle package update.
Source code in toolboxv2/utils/clis/venv_runner.py
806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 | |
main()
¶
Main entry point.
Source code in toolboxv2/utils/clis/venv_runner.py
916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 | |
print_header(title)
¶
Print section header.
Source code in toolboxv2/utils/clis/venv_runner.py
56 57 58 59 60 61 | |
print_status(status, message)
¶
Print colored status message.
Source code in toolboxv2/utils/clis/venv_runner.py
43 44 45 46 47 48 49 50 51 52 53 | |
save_discovered_environments(discovered)
¶
Save discovered environments to registry file.
Source code in toolboxv2/utils/clis/venv_runner.py
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | |
daemon
¶
DaemonUtil
¶
Source code in toolboxv2/utils/daemon/daemon_util.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | |
__init__(*args, **kwargs)
¶
Standard constructor used for arguments pass Do not override. Use ainit instead
Source code in toolboxv2/utils/daemon/daemon_util.py
19 20 21 22 23 24 25 26 27 | |
__initobj()
async
¶
Crutch used for await after spawning
Source code in toolboxv2/utils/daemon/daemon_util.py
29 30 31 32 33 34 35 | |
start_server(connection_type=None)
async
¶
Start the server using app and the socket manager
Source code in toolboxv2/utils/daemon/daemon_util.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | |
daemon_util
¶
DaemonUtil
¶
Source code in toolboxv2/utils/daemon/daemon_util.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | |
__init__(*args, **kwargs)
¶Standard constructor used for arguments pass Do not override. Use ainit instead
Source code in toolboxv2/utils/daemon/daemon_util.py
19 20 21 22 23 24 25 26 27 | |
__initobj()
async
¶Crutch used for await after spawning
Source code in toolboxv2/utils/daemon/daemon_util.py
29 30 31 32 33 34 35 | |
start_server(connection_type=None)
async
¶Start the server using app and the socket manager
Source code in toolboxv2/utils/daemon/daemon_util.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | |
extras
¶
BaseWidget
¶
Source code in toolboxv2/utils/extras/base_widget.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | |
create_iframe_asset(app, iframe_id, asset_id=None)
¶
Erstellt ein Asset für einen registrierten iframe
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
App-Instanz |
required | |
iframe_id
|
str
|
ID des registrierten iframes |
required |
asset_id
|
str
|
Optional, spezifische Asset-ID |
None
|
Source code in toolboxv2/utils/extras/base_widget.py
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | |
load_iframe(app, iframe_id, asset_id=None)
¶
Lädt einen registrierten iframe und gibt das HTML-Element zurück
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
App-Instanz |
required | |
iframe_id
|
str
|
ID des registrierten iframes |
required |
asset_id
|
str
|
Optional, spezifische Asset-ID |
None
|
Source code in toolboxv2/utils/extras/base_widget.py
280 281 282 283 284 285 286 287 288 289 290 | |
modify_iterator(iterator, replace)
¶
['a', 'b'] -> [{replace[0]: 'a',..., replace[len(replace)-1]: 'a'}, {replace[0]: 'b',..., replace[len(replace)-1]: 'b'}, ]
Source code in toolboxv2/utils/extras/base_widget.py
94 95 96 97 98 99 100 101 102 103 | |
register_iframe(iframe_id, src, width='100%', height='500px', **kwargs)
¶
Registriert einen iframe mit gegebener ID und Quelle
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
iframe_id
|
str
|
Eindeutige ID für den iframe |
required |
src
|
str
|
URL oder Pfad zur Quelle des iframes |
required |
width
|
str
|
Breite des iframes (default: "100%") |
'100%'
|
height
|
str
|
Höhe des iframes (default: "500px") |
'500px'
|
**kwargs
|
Weitere iframe-Attribute |
{}
|
Source code in toolboxv2/utils/extras/base_widget.py
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | |
ask_question(title, message, yes_callback=None, no_callback=None, **kwargs)
¶
Ask a yes/no question
Source code in toolboxv2/utils/extras/notification.py
817 818 819 820 821 822 823 824 825 826 827 828 829 830 | |
quick_error(title, message, **kwargs)
¶
Quick error notification
Source code in toolboxv2/utils/extras/notification.py
811 812 813 814 | |
quick_info(title, message, **kwargs)
¶
Quick info notification
Source code in toolboxv2/utils/extras/notification.py
793 794 795 796 | |
quick_success(title, message, **kwargs)
¶
Quick success notification
Source code in toolboxv2/utils/extras/notification.py
799 800 801 802 | |
quick_warning(title, message, **kwargs)
¶
Quick warning notification
Source code in toolboxv2/utils/extras/notification.py
805 806 807 808 | |
Style
¶
Spinner
¶
Enhanced Spinner with tqdm-like line rendering.
Source code in toolboxv2/utils/extras/Style.py
578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 | |
__enter__()
¶Start the spinner.
Source code in toolboxv2/utils/extras/Style.py
644 645 646 647 648 649 | |
__exit__(exc_type, exc_value, exc_traceback)
¶Stop the spinner.
Source code in toolboxv2/utils/extras/Style.py
651 652 653 654 655 656 657 658 | |
__init__(message='Loading...', delay=0.1, symbols=None, count_down=False, time_in_s=0)
¶Initialize spinner with flexible configuration.
Source code in toolboxv2/utils/extras/Style.py
592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 | |
SpinnerManager
¶
Manages multiple spinners to ensure tqdm-like line rendering. Automatically captures SIGINT (Ctrl+C) to stop all spinners.
Source code in toolboxv2/utils/extras/Style.py
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 | |
register_spinner(spinner)
¶Register a new spinner.
Source code in toolboxv2/utils/extras/Style.py
523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 | |
unregister_spinner(spinner)
¶Unregister a completed spinner.
Source code in toolboxv2/utils/extras/Style.py
539 540 541 542 543 | |
base_widget
¶
BaseWidget
¶
Source code in toolboxv2/utils/extras/base_widget.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | |
create_iframe_asset(app, iframe_id, asset_id=None)
¶Erstellt ein Asset für einen registrierten iframe
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
App-Instanz |
required | |
iframe_id
|
str
|
ID des registrierten iframes |
required |
asset_id
|
str
|
Optional, spezifische Asset-ID |
None
|
Source code in toolboxv2/utils/extras/base_widget.py
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | |
load_iframe(app, iframe_id, asset_id=None)
¶Lädt einen registrierten iframe und gibt das HTML-Element zurück
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
App-Instanz |
required | |
iframe_id
|
str
|
ID des registrierten iframes |
required |
asset_id
|
str
|
Optional, spezifische Asset-ID |
None
|
Source code in toolboxv2/utils/extras/base_widget.py
280 281 282 283 284 285 286 287 288 289 290 | |
modify_iterator(iterator, replace)
¶['a', 'b'] -> [{replace[0]: 'a',..., replace[len(replace)-1]: 'a'}, {replace[0]: 'b',..., replace[len(replace)-1]: 'b'}, ]
Source code in toolboxv2/utils/extras/base_widget.py
94 95 96 97 98 99 100 101 102 103 | |
register_iframe(iframe_id, src, width='100%', height='500px', **kwargs)
¶Registriert einen iframe mit gegebener ID und Quelle
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
iframe_id
|
str
|
Eindeutige ID für den iframe |
required |
src
|
str
|
URL oder Pfad zur Quelle des iframes |
required |
width
|
str
|
Breite des iframes (default: "100%") |
'100%'
|
height
|
str
|
Höhe des iframes (default: "500px") |
'500px'
|
**kwargs
|
Weitere iframe-Attribute |
{}
|
Source code in toolboxv2/utils/extras/base_widget.py
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | |
blobs
¶
BlobFile
¶
Source code in toolboxv2/utils/extras/blobs.py
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 | |
exists()
¶Checks if the specific file path exists within the blob without reading its content. This is an efficient, read-only operation.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the file exists within the blob, False otherwise. |
Source code in toolboxv2/utils/extras/blobs.py
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | |
BlobStorage
¶
A production-ready client for the distributed blob storage server. It handles communication with a list of server instances, manages a local cache, and implements backoff/retry logic for resilience.
Source code in toolboxv2/utils/extras/blobs.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | |
create_blob(data, blob_id=None)
¶Creates a new blob. The blob_id is calculated client-side by hashing the content, and the data is sent to the correct server determined by the consistent hash ring. This uses a PUT request, making creation idempotent.
Source code in toolboxv2/utils/extras/blobs.py
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | |
ConsistentHashRing
¶
A consistent hash ring implementation to map keys (blob_ids) to nodes (servers). It uses virtual nodes (replicas) to ensure a more uniform distribution of keys.
Source code in toolboxv2/utils/extras/blobs.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | |
__init__(replicas=100)
¶:param replicas: The number of virtual nodes for each physical node. Higher values lead to more balanced distribution.
Source code in toolboxv2/utils/extras/blobs.py
25 26 27 28 29 30 31 32 | |
add_node(node)
¶Adds a physical node to the hash ring.
Source code in toolboxv2/utils/extras/blobs.py
38 39 40 41 42 43 44 | |
get_nodes_for_key(key)
¶Returns an ordered list of nodes responsible for the given key. The first node in the list is the primary, the rest are failover candidates in preferential order.
Source code in toolboxv2/utils/extras/blobs.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | |
gist_control
¶
GistLoader
¶
Source code in toolboxv2/utils/extras/gist_control.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | |
get_spec(module_name)
¶Gibt die Modul-Specifikation zurück.
Source code in toolboxv2/utils/extras/gist_control.py
23 24 25 | |
load_module(module_name)
¶Lädt das Modul mit dem gegebenen Namen.
Source code in toolboxv2/utils/extras/gist_control.py
13 14 15 16 17 18 19 20 21 | |
helper_test_functions
¶
generate_edge_value(param_type)
¶
Generiert Edge-Case-Werte basierend auf dem Parametertyp.
Source code in toolboxv2/utils/extras/helper_test_functions.py
35 36 37 38 39 40 41 42 43 44 | |
generate_normal_value(param_type)
¶
Generiert normale Werte basierend auf dem Parametertyp.
Source code in toolboxv2/utils/extras/helper_test_functions.py
47 48 49 50 51 52 53 54 55 56 57 58 59 | |
keword_matcher
¶
calculate_keyword_score(text, keywords)
¶
Berechnet den Keyword-Score basierend auf der Häufigkeit der Keywords im Text. Case-insensitive und optimiert für Geschwindigkeit.
:param text: Eingabetext als String :param keywords: Set von Keywords :return: Gesamt-Score als Integer
Source code in toolboxv2/utils/extras/keword_matcher.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |
calculate_weighted_score(text, keyword_weights)
¶
Berechnet gewichteten Score mit unterschiedlichen Gewichten pro Keyword
:param text: Eingabetext :param keyword_weights: Dictionary mit {Keyword: Gewicht} :return: Gewichteter Gesamt-Score
Source code in toolboxv2/utils/extras/keword_matcher.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |
extract_keywords(text, max_len=-1, min_word_length=3, with_weights=False, remove_stopwords=True, stopwords=True)
¶
Extrahiert Keywords mit optionaler Frequenzgewichtung
:param text: Eingabetext :param max_len: Maximale Anzahl Keywords (-1 = alle) :param min_word_length: Minimale Wortlänge :param with_weights: Gibt Wort+Frequenz zurück wenn True :param remove_stopwords: Filtert deutsche Stopwörter :param german_stopwords: Verwendet deutsche Standard-Stopwörter :return: Keywords oder (Keyword, Häufigkeit) Paare
Source code in toolboxv2/utils/extras/keword_matcher.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | |
mkdocs
¶
CodeElement
dataclass
¶
Represents a code element (class, function, etc.)
Source code in toolboxv2/utils/extras/mkdocs.py
48 49 50 51 52 53 54 55 56 57 58 59 | |
CodeElementExtractor
¶
Extracts code elements from source files
Source code in toolboxv2/utils/extras/mkdocs.py
368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 | |
extract_python_elements(file_path)
¶Extract elements from Python file
Source code in toolboxv2/utils/extras/mkdocs.py
371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 | |
DocSection
dataclass
¶
Represents a documentation section with change tracking
Source code in toolboxv2/utils/extras/mkdocs.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | |
DocsAnalyzer
¶
Analyzes documentation quality and completeness
Source code in toolboxv2/utils/extras/mkdocs.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | |
find_missing_implementations()
¶Find TOC entries that don't have corresponding implementations
Source code in toolboxv2/utils/extras/mkdocs.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | |
find_unclear_sections()
¶Find sections with unclear or placeholder content
Source code in toolboxv2/utils/extras/mkdocs.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | |
DocsIndex
dataclass
¶
Complete documentation index with section-level tracking
Source code in toolboxv2/utils/extras/mkdocs.py
62 63 64 65 66 67 68 69 70 71 | |
DocsIndexer
¶
Main indexer that builds and maintains the complete documentation index
Source code in toolboxv2/utils/extras/mkdocs.py
680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 | |
build_initial_index(file_extensions=None)
¶Build complete index for the first time with directory filtering
Source code in toolboxv2/utils/extras/mkdocs.py
814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 | |
update_index(current_index, force_full_scan=False)
¶Update index based on detected changes or force full scan
Source code in toolboxv2/utils/extras/mkdocs.py
856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 | |
update_index_precise(current_index, force_full_scan=False, max_files_per_batch=10)
async
¶Update index with precise section-level tracking
Source code in toolboxv2/utils/extras/mkdocs.py
702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 | |
FileChange
dataclass
¶
Represents a file change detected by git
Source code in toolboxv2/utils/extras/mkdocs.py
75 76 77 78 79 80 81 82 | |
GitChangeDetector
¶
Detects changes in the repository since last index update
Source code in toolboxv2/utils/extras/mkdocs.py
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | |
get_changed_files(since_commit=None)
¶Get list of changed files since given commit with timeout
Source code in toolboxv2/utils/extras/mkdocs.py
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | |
get_current_commit_hash()
¶Get current git commit hash
Source code in toolboxv2/utils/extras/mkdocs.py
171 172 173 174 175 176 177 178 179 180 181 182 | |
ImportAnalyzer
¶
Analyzes imports and dependencies in Python and JS files
Source code in toolboxv2/utils/extras/mkdocs.py
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 | |
analyze_js_imports(file_path)
¶Analyze JavaScript/TypeScript imports
Source code in toolboxv2/utils/extras/mkdocs.py
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 | |
analyze_python_imports(file_path)
¶Analyze Python imports
Source code in toolboxv2/utils/extras/mkdocs.py
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 | |
ImportReference
dataclass
¶
Represents an import/dependency reference
Source code in toolboxv2/utils/extras/mkdocs.py
85 86 87 88 89 90 91 92 | |
MarkdownDocsSystem
¶
Production-ready unified markdown documentation system
Source code in toolboxv2/utils/extras/mkdocs.py
1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 | |
add_source_code_lookup_to_app()
¶Add source code lookup method to app
Source code in toolboxv2/utils/extras/mkdocs.py
2500 2501 2502 2503 | |
auto_update_docs(dry_run=False, max_updates=5, timeout=30)
async
¶Automatically update documentation with timeout protection
Source code in toolboxv2/utils/extras/mkdocs.py
1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 | |
docs_reader(query=None, section_id=None, file_path=None, tags=None, include_source_refs=True, format_type='structured', max_results=25)
async
¶Ultra-fast unified docs reader with proper index loading
Source code in toolboxv2/utils/extras/mkdocs.py
1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 | |
docs_writer(action, file_path=None, section_title=None, content=None, source_file=None, auto_generate=False, position=None, level=2)
async
¶Unified optimized docs writer
Source code in toolboxv2/utils/extras/mkdocs.py
1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 | |
get_update_suggestions(force_scan=False, max_suggestions=50)
async
¶Get prioritized documentation update suggestions
Source code in toolboxv2/utils/extras/mkdocs.py
1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 | |
initial_docs_parse(update_index=True, force_rebuild=False)
async
¶Parse existing documentation and build initial index with proper saving
Source code in toolboxv2/utils/extras/mkdocs.py
1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 | |
source_code_lookup(element_name=None, file_path=None, element_type=None, max_results=25, return_code_block=True)
¶Look up source code elements with option to return single method code blocks
Source code in toolboxv2/utils/extras/mkdocs.py
2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 | |
MarkdownParser
¶
Parses markdown files and extracts sections
Source code in toolboxv2/utils/extras/mkdocs.py
448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 | |
parse_file(file_path)
¶Parse markdown file into sections
Source code in toolboxv2/utils/extras/mkdocs.py
451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 | |
parse_file_incremental(file_path, existing_sections=None)
¶Parse file with section-level change detection
Source code in toolboxv2/utils/extras/mkdocs.py
563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 | |
SectionManager
¶
Manages precise operations on documentation sections
Source code in toolboxv2/utils/extras/mkdocs.py
1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 | |
add_section(file_path, section, position=None)
¶Add a new section to a markdown file
Source code in toolboxv2/utils/extras/mkdocs.py
1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 | |
create_new_file(file_path, initial_content='')
¶Create a new markdown file
Source code in toolboxv2/utils/extras/mkdocs.py
1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 | |
delete_section(section)
¶Delete a section from a file
Source code in toolboxv2/utils/extras/mkdocs.py
1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 | |
update_section(section, new_content)
¶Update an existing section
Source code in toolboxv2/utils/extras/mkdocs.py
1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 | |
TOCEntry
¶
Represents a table of contents entry
Source code in toolboxv2/utils/extras/mkdocs.py
95 96 97 98 99 100 101 102 103 104 105 | |
add_to_app(app, include_dirs=None, exclude_dirs=None)
¶
Add optimized markdown docs system to app
Source code in toolboxv2/utils/extras/mkdocs.py
2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 | |
notification
¶
NotificationAction
dataclass
¶
Represents an action button in a notification
Source code in toolboxv2/utils/extras/notification.py
19 20 21 22 23 24 25 | |
NotificationDetails
dataclass
¶
Expandable details for notifications
Source code in toolboxv2/utils/extras/notification.py
28 29 30 31 32 33 | |
NotificationPosition
¶
Position options for notifications
Source code in toolboxv2/utils/extras/notification.py
44 45 46 47 48 49 50 51 52 53 54 | |
NotificationSystem
¶
Cross-platform notification system with OS integration and tkinter fallback
Source code in toolboxv2/utils/extras/notification.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 | |
set_default_position(position)
¶Set default position for notifications
Source code in toolboxv2/utils/extras/notification.py
185 186 187 | |
set_default_timeout(timeout_ms)
¶Set default timeout for notifications
Source code in toolboxv2/utils/extras/notification.py
171 172 173 174 175 176 177 178 | |
set_max_timeout(max_timeout_ms)
¶Set maximum allowed timeout
Source code in toolboxv2/utils/extras/notification.py
180 181 182 183 | |
show_notification(title, message, notification_type=NotificationType.INFO, actions=None, details=None, timeout=None, play_sound=False, position=None)
¶Show a notification with optional actions and details
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
title
|
str
|
Title of the notification |
required |
message
|
str
|
Main message of the notification |
required |
notification_type
|
NotificationType
|
Type of notification |
INFO
|
actions
|
List[NotificationAction]
|
List of action buttons |
None
|
details
|
NotificationDetails
|
Expandable details |
None
|
timeout
|
int
|
Timeout in milliseconds |
None
|
play_sound
|
bool
|
Whether to play a sound |
False
|
position
|
NotificationPosition
|
Position on screen |
None
|
Returns the ID of the selected action, or None if dismissed
Source code in toolboxv2/utils/extras/notification.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | |
NotificationType
¶
Types of notifications
Source code in toolboxv2/utils/extras/notification.py
36 37 38 39 40 41 42 | |
ask_question(title, message, yes_callback=None, no_callback=None, **kwargs)
¶
Ask a yes/no question
Source code in toolboxv2/utils/extras/notification.py
817 818 819 820 821 822 823 824 825 826 827 828 829 830 | |
create_notification_system()
¶
Create and return a notification system instance
Source code in toolboxv2/utils/extras/notification.py
788 789 790 | |
example_notifications()
¶
Example notification scenarios with better timing
Source code in toolboxv2/utils/extras/notification.py
834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 | |
quick_error(title, message, **kwargs)
¶
Quick error notification
Source code in toolboxv2/utils/extras/notification.py
811 812 813 814 | |
quick_info(title, message, **kwargs)
¶
Quick info notification
Source code in toolboxv2/utils/extras/notification.py
793 794 795 796 | |
quick_success(title, message, **kwargs)
¶
Quick success notification
Source code in toolboxv2/utils/extras/notification.py
799 800 801 802 | |
quick_warning(title, message, **kwargs)
¶
Quick warning notification
Source code in toolboxv2/utils/extras/notification.py
805 806 807 808 | |
reqbuilder
¶
generate_requirements(folder, output_file)
¶
Generates requirements.txt for the specified folder using pipreqs.
Source code in toolboxv2/utils/extras/reqbuilder.py
7 8 9 10 11 12 13 14 15 16 17 18 19 | |
run_pipeline(base_dir)
¶
Runs the entire pipeline to generate requirements files.
Source code in toolboxv2/utils/extras/reqbuilder.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | |
install_support
¶
Complete TB Language Setup - Build executable - Setup file associations - Install VS Code extension - Install PyCharm plugin
TBSetup
¶
Complete TB Language setup manager
Source code in toolboxv2/utils/tbx/install_support.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 | |
build_executable()
¶
Step 1: Build TB Language
Source code in toolboxv2/utils/tbx/install_support.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
build_pycharm_plugin()
¶
Build PyCharm plugin JAR
Source code in toolboxv2/utils/tbx/install_support.py
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 | |
create_pycharm_plugin()
¶
Create PyCharm plugin structure
Source code in toolboxv2/utils/tbx/install_support.py
199 200 201 202 203 204 205 206 207 208 | |
find_pycharm_config_dirs()
¶
Find PyCharm config directories
Source code in toolboxv2/utils/tbx/install_support.py
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 | |
install_pycharm_plugin()
¶
Install plugin to PyCharm
Source code in toolboxv2/utils/tbx/install_support.py
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | |
setup_all()
¶
Run complete setup
Source code in toolboxv2/utils/tbx/install_support.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | |
setup_pycharm()
¶
Step 4: PyCharm plugin
Source code in toolboxv2/utils/tbx/install_support.py
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | |
setup_system_integration()
¶
Step 2: System integration
Source code in toolboxv2/utils/tbx/install_support.py
90 91 92 93 94 95 96 97 98 99 100 101 102 | |
setup_vscode()
¶
Step 3: VS Code extension
Source code in toolboxv2/utils/tbx/install_support.py
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | |
main()
¶
Main entry point
Source code in toolboxv2/utils/tbx/install_support.py
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 | |
proxy
¶
ProxyUtil
¶
Source code in toolboxv2/utils/proxy/prox_util.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | |
__init__(*args, **kwargs)
¶
Standard constructor used for arguments pass Do not override. Use ainit instead
Source code in toolboxv2/utils/proxy/prox_util.py
20 21 22 23 24 25 26 | |
__initobj()
async
¶
Crutch used for await after spawning
Source code in toolboxv2/utils/proxy/prox_util.py
28 29 30 31 32 33 34 | |
prox_util
¶
ProxyUtil
¶
Source code in toolboxv2/utils/proxy/prox_util.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | |
__init__(*args, **kwargs)
¶Standard constructor used for arguments pass Do not override. Use ainit instead
Source code in toolboxv2/utils/proxy/prox_util.py
20 21 22 23 24 25 26 | |
__initobj()
async
¶Crutch used for await after spawning
Source code in toolboxv2/utils/proxy/prox_util.py
28 29 30 31 32 33 34 | |
security
¶
Code
¶
Source code in toolboxv2/utils/security/cryp.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 | |
decrypt_asymmetric(encrypted_text_hex, private_key_str)
staticmethod
¶
Entschlüsselt einen Text mit einem gegebenen privaten Schlüssel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
encrypted_text_hex
|
str
|
Der verschlüsselte Text als Hex-String. |
required |
private_key_str
|
str
|
Der private Schlüssel als String. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Der entschlüsselte Text. |
Source code in toolboxv2/utils/security/cryp.py
336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 | |
decrypt_symmetric(encrypted_text, key, to_str=True, mute=False)
staticmethod
¶
Entschlüsselt einen Text mit einem gegebenen symmetrischen Schlüssel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
encrypted_text
|
str
|
Der zu entschlüsselnde Text. |
required |
key
|
str
|
Der symmetrische Schlüssel. |
required |
to_str
|
bool
|
default true returns str if false returns bytes |
True
|
Returns: str: Der entschlüsselte Text.
Source code in toolboxv2/utils/security/cryp.py
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | |
encrypt_asymmetric(text, public_key_str)
staticmethod
¶
Verschlüsselt einen Text mit einem gegebenen öffentlichen Schlüssel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Der zu verschlüsselnde Text. |
required |
public_key_str
|
str
|
Der öffentliche Schlüssel als String oder im pem format. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Der verschlüsselte Text. |
Source code in toolboxv2/utils/security/cryp.py
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | |
encrypt_symmetric(text, key)
staticmethod
¶
Verschlüsselt einen Text mit einem gegebenen symmetrischen Schlüssel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Der zu verschlüsselnde Text. |
required |
key
|
str
|
Der symmetrische Schlüssel. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Der verschlüsselte Text. |
Source code in toolboxv2/utils/security/cryp.py
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | |
generate_asymmetric_keys()
staticmethod
¶
Generiert ein Paar von öffentlichen und privaten Schlüsseln für die asymmetrische Verschlüsselung.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
seed
|
int
|
Ein optionaler Seed-Wert. Standardmäßig None. |
required |
Returns:
| Type | Description |
|---|---|
(str, str)
|
Ein Tupel aus öffentlichem und privatem Schlüssel. |
Source code in toolboxv2/utils/security/cryp.py
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | |
generate_random_string(length)
staticmethod
¶
Generiert eine zufällige Zeichenkette der angegebenen Länge.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
length
|
int
|
Die Länge der zu generierenden Zeichenkette. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Die generierte Zeichenkette. |
Source code in toolboxv2/utils/security/cryp.py
81 82 83 84 85 86 87 88 89 90 91 92 | |
generate_seed()
staticmethod
¶
Erzeugt eine zufällige Zahl als Seed.
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Eine zufällige Zahl. |
Source code in toolboxv2/utils/security/cryp.py
114 115 116 117 118 119 120 121 122 | |
generate_symmetric_key(as_str=True)
staticmethod
¶
Generiert einen Schlüssel für die symmetrische Verschlüsselung.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str or bytes
|
Der generierte Schlüssel. |
Source code in toolboxv2/utils/security/cryp.py
140 141 142 143 144 145 146 147 148 149 150 151 | |
load_keys_from_files(directory='keys')
staticmethod
¶
Lädt die Schlüssel aus den Dateien. Der private Schlüssel wird mit dem Device Key entschlüsselt.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
directory
|
str
|
Das Verzeichnis, aus dem die Schlüssel geladen werden sollen |
'keys'
|
Returns:
| Type | Description |
|---|---|
(str, str)
|
Ein Tupel aus öffentlichem und privatem Schlüssel |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
Wenn die Schlüsseldateien nicht gefunden werden können |
Source code in toolboxv2/utils/security/cryp.py
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | |
one_way_hash(text, salt='', pepper='')
staticmethod
¶
Erzeugt einen Hash eines gegebenen Textes mit Salt, Pepper und optional einem Seed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Der zu hashende Text. |
required |
salt
|
str
|
Der Salt-Wert. |
''
|
pepper
|
str
|
Der Pepper-Wert. |
''
|
seed
|
int
|
Ein optionaler Seed-Wert. Standardmäßig None. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Der resultierende Hash-Wert. |
Source code in toolboxv2/utils/security/cryp.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | |
pem_to_public_key(pem_key)
staticmethod
¶
Konvertiert einen PEM-kodierten öffentlichen Schlüssel in ein PublicKey-Objekt.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pem_key
|
str
|
Der PEM-kodierte öffentliche Schlüssel. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
PublicKey |
Das PublicKey-Objekt. |
Source code in toolboxv2/utils/security/cryp.py
435 436 437 438 439 440 441 442 443 444 445 446 447 | |
public_key_to_pem(public_key)
staticmethod
¶
Konvertiert ein PublicKey-Objekt in einen PEM-kodierten String.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
public_key
|
PublicKey
|
Das PublicKey-Objekt. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
Der PEM-kodierte öffentliche Schlüssel. |
Source code in toolboxv2/utils/security/cryp.py
449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 | |
save_keys_to_files(public_key, private_key, directory='keys')
staticmethod
¶
Speichert die generierten Schlüssel in separate Dateien. Der private Schlüssel wird mit dem Device Key verschlüsselt.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
public_key
|
str
|
Der öffentliche Schlüssel im PEM-Format |
required |
private_key
|
str
|
Der private Schlüssel im PEM-Format |
required |
directory
|
str
|
Das Verzeichnis, in dem die Schlüssel gespeichert werden sollen |
'keys'
|
Source code in toolboxv2/utils/security/cryp.py
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 | |
cryp
¶
Code
¶
Source code in toolboxv2/utils/security/cryp.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 | |
decrypt_asymmetric(encrypted_text_hex, private_key_str)
staticmethod
¶Entschlüsselt einen Text mit einem gegebenen privaten Schlüssel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
encrypted_text_hex
|
str
|
Der verschlüsselte Text als Hex-String. |
required |
private_key_str
|
str
|
Der private Schlüssel als String. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Der entschlüsselte Text. |
Source code in toolboxv2/utils/security/cryp.py
336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 | |
decrypt_symmetric(encrypted_text, key, to_str=True, mute=False)
staticmethod
¶Entschlüsselt einen Text mit einem gegebenen symmetrischen Schlüssel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
encrypted_text
|
str
|
Der zu entschlüsselnde Text. |
required |
key
|
str
|
Der symmetrische Schlüssel. |
required |
to_str
|
bool
|
default true returns str if false returns bytes |
True
|
Returns: str: Der entschlüsselte Text.
Source code in toolboxv2/utils/security/cryp.py
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | |
encrypt_asymmetric(text, public_key_str)
staticmethod
¶Verschlüsselt einen Text mit einem gegebenen öffentlichen Schlüssel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Der zu verschlüsselnde Text. |
required |
public_key_str
|
str
|
Der öffentliche Schlüssel als String oder im pem format. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Der verschlüsselte Text. |
Source code in toolboxv2/utils/security/cryp.py
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | |
encrypt_symmetric(text, key)
staticmethod
¶Verschlüsselt einen Text mit einem gegebenen symmetrischen Schlüssel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Der zu verschlüsselnde Text. |
required |
key
|
str
|
Der symmetrische Schlüssel. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Der verschlüsselte Text. |
Source code in toolboxv2/utils/security/cryp.py
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | |
generate_asymmetric_keys()
staticmethod
¶Generiert ein Paar von öffentlichen und privaten Schlüsseln für die asymmetrische Verschlüsselung.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
seed
|
int
|
Ein optionaler Seed-Wert. Standardmäßig None. |
required |
Returns:
| Type | Description |
|---|---|
(str, str)
|
Ein Tupel aus öffentlichem und privatem Schlüssel. |
Source code in toolboxv2/utils/security/cryp.py
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | |
generate_random_string(length)
staticmethod
¶Generiert eine zufällige Zeichenkette der angegebenen Länge.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
length
|
int
|
Die Länge der zu generierenden Zeichenkette. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Die generierte Zeichenkette. |
Source code in toolboxv2/utils/security/cryp.py
81 82 83 84 85 86 87 88 89 90 91 92 | |
generate_seed()
staticmethod
¶Erzeugt eine zufällige Zahl als Seed.
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Eine zufällige Zahl. |
Source code in toolboxv2/utils/security/cryp.py
114 115 116 117 118 119 120 121 122 | |
generate_symmetric_key(as_str=True)
staticmethod
¶Generiert einen Schlüssel für die symmetrische Verschlüsselung.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str or bytes
|
Der generierte Schlüssel. |
Source code in toolboxv2/utils/security/cryp.py
140 141 142 143 144 145 146 147 148 149 150 151 | |
load_keys_from_files(directory='keys')
staticmethod
¶Lädt die Schlüssel aus den Dateien. Der private Schlüssel wird mit dem Device Key entschlüsselt.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
directory
|
str
|
Das Verzeichnis, aus dem die Schlüssel geladen werden sollen |
'keys'
|
Returns:
| Type | Description |
|---|---|
(str, str)
|
Ein Tupel aus öffentlichem und privatem Schlüssel |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
Wenn die Schlüsseldateien nicht gefunden werden können |
Source code in toolboxv2/utils/security/cryp.py
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | |
one_way_hash(text, salt='', pepper='')
staticmethod
¶Erzeugt einen Hash eines gegebenen Textes mit Salt, Pepper und optional einem Seed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Der zu hashende Text. |
required |
salt
|
str
|
Der Salt-Wert. |
''
|
pepper
|
str
|
Der Pepper-Wert. |
''
|
seed
|
int
|
Ein optionaler Seed-Wert. Standardmäßig None. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Der resultierende Hash-Wert. |
Source code in toolboxv2/utils/security/cryp.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | |
pem_to_public_key(pem_key)
staticmethod
¶Konvertiert einen PEM-kodierten öffentlichen Schlüssel in ein PublicKey-Objekt.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pem_key
|
str
|
Der PEM-kodierte öffentliche Schlüssel. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
PublicKey |
Das PublicKey-Objekt. |
Source code in toolboxv2/utils/security/cryp.py
435 436 437 438 439 440 441 442 443 444 445 446 447 | |
public_key_to_pem(public_key)
staticmethod
¶Konvertiert ein PublicKey-Objekt in einen PEM-kodierten String.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
public_key
|
PublicKey
|
Das PublicKey-Objekt. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
Der PEM-kodierte öffentliche Schlüssel. |
Source code in toolboxv2/utils/security/cryp.py
449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 | |
save_keys_to_files(public_key, private_key, directory='keys')
staticmethod
¶Speichert die generierten Schlüssel in separate Dateien. Der private Schlüssel wird mit dem Device Key verschlüsselt.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
public_key
|
str
|
Der öffentliche Schlüssel im PEM-Format |
required |
private_key
|
str
|
Der private Schlüssel im PEM-Format |
required |
directory
|
str
|
Das Verzeichnis, in dem die Schlüssel gespeichert werden sollen |
'keys'
|
Source code in toolboxv2/utils/security/cryp.py
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 | |
singelton_class
¶
Singleton
¶
Singleton metaclass for ensuring only one instance of a class.
Source code in toolboxv2/utils/singelton_class.py
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
system
¶
AppType
¶
Source code in toolboxv2/utils/system/types.py
1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 | |
debug
property
writable
¶
proxi attr
a_exit()
async
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1903 1904 | |
a_fuction_runner(function, function_data, args, kwargs)
async
¶
parameters = function_data.get('params') modular_name = function_data.get('module_name') function_name = function_data.get('func_name') mod_function_name = f"{modular_name}.{function_name}"
proxi attr
Source code in toolboxv2/utils/system/types.py
1968 1969 1970 1971 1972 1973 1974 1975 1976 | |
a_remove_mod(mod_name, spec='app', delete=True)
async
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1894 1895 | |
a_run_any(mod_function_name, backwords_compability_variabel_string_holder=None, get_results=False, tb_run_function_with_state=True, tb_run_with_specification='app', args_=None, kwargs_=None, *args, **kwargs)
async
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1990 1991 1992 1993 1994 1995 | |
a_run_function(mod_function_name, tb_run_function_with_state=True, tb_run_with_specification='app', args_=None, kwargs_=None, *args, **kwargs)
async
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1948 1949 1950 1951 1952 1953 1954 1955 1956 | |
debug_rains(e)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1787 1788 | |
disconnect(*args, **kwargs)
async
staticmethod
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1775 1776 1777 | |
execute_all_functions(m_query='', f_query='', enable_profiling=True)
async
¶
Execute all functions with parallel processing and optional profiling.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
m_query
|
str
|
Module name query filter |
''
|
f_query
|
str
|
Function name query filter |
''
|
enable_profiling
|
bool
|
Enable detailed profiling information |
True
|
Source code in toolboxv2/utils/system/types.py
2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 | |
exit()
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1897 1898 | |
exit_main(*args, **kwargs)
staticmethod
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1763 1764 1765 | |
footprint(update_tracking=True)
¶
Erfasst den aktuellen Ressourcen-Footprint der Toolbox-Instanz.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update_tracking
|
bool
|
Wenn True, aktualisiert Min/Max/Avg-Tracking |
True
|
Returns:
| Type | Description |
|---|---|
FootprintMetrics
|
FootprintMetrics mit allen erfassten Metriken |
Source code in toolboxv2/utils/system/types.py
1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 | |
fuction_runner(function, function_data, args, kwargs, t0=0.0)
¶
parameters = function_data.get('params') modular_name = function_data.get('module_name') function_name = function_data.get('func_name') mod_function_name = f"{modular_name}.{function_name}"
proxi attr
Source code in toolboxv2/utils/system/types.py
1958 1959 1960 1961 1962 1963 1964 1965 1966 | |
get_all_mods(working_dir='mods', path_to='./runtime')
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1868 1869 | |
get_autocompletion_dict()
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
2174 2175 | |
get_function(name, **kwargs)
¶
Kwargs for _get_function metadata:: return the registered function dictionary stateless: (function_data, None), 0 stateful: (function_data, higher_order_function), 0 state::boolean specification::str default app
Source code in toolboxv2/utils/system/types.py
1909 1910 1911 1912 1913 1914 1915 1916 1917 | |
get_mod(name, spec='app')
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1997 1998 | |
get_username(get_input=False, default='loot')
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
2177 2178 | |
hide_console(*args, **kwargs)
async
staticmethod
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1767 1768 1769 | |
inplace_load_instance(mod_name, loc='toolboxv2.mods.', spec='app', save=True)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1834 1835 | |
load_all_mods_in_file(working_dir='mods')
async
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1865 1866 | |
load_external_mods()
async
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1862 1863 | |
load_mod(mod_name, mlm='I', **kwargs)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1856 1857 | |
mod_online(mod_name, installed=False)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1843 1844 | |
print(text, *args, **kwargs)
staticmethod
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
2000 2001 2002 | |
print_footprint(detailed=True)
¶
Gibt den Footprint formatiert aus.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
detailed
|
bool
|
Wenn True, zeigt alle Details, sonst nur Zusammenfassung |
True
|
Returns:
| Type | Description |
|---|---|
str
|
Formatierter Footprint-String |
Source code in toolboxv2/utils/system/types.py
1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 | |
print_ok()
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1881 1882 1883 | |
reload_mod(mod_name, spec='app', is_file=True, loc='toolboxv2.mods.')
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1885 1886 | |
remove_mod(mod_name, spec='app', delete=True)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1891 1892 | |
rrun_flows(name, **kwargs)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1796 1797 | |
run_a_from_sync(function, *args)
¶
run a async fuction
Source code in toolboxv2/utils/system/types.py
1919 1920 1921 1922 | |
run_any(mod_function_name, backwords_compability_variabel_string_holder=None, get_results=False, tb_run_function_with_state=True, tb_run_with_specification='app', args_=None, kwargs_=None, *args, **kwargs)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1984 1985 1986 1987 1988 | |
run_bg_task(task)
¶
run a async fuction
Source code in toolboxv2/utils/system/types.py
1934 1935 1936 1937 | |
run_bg_task_advanced(task, *args, **kwargs)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1924 1925 1926 1927 | |
run_flows(name, **kwargs)
async
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1793 1794 | |
run_function(mod_function_name, tb_run_function_with_state=True, tb_run_with_specification='app', args_=None, kwargs_=None, *args, **kwargs)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1938 1939 1940 1941 1942 1943 1944 1945 1946 | |
run_http(mod_function_name, function_name=None, method='GET', args_=None, kwargs_=None, *args, **kwargs)
async
¶
run a function remote via http / https
Source code in toolboxv2/utils/system/types.py
1978 1979 1980 1981 1982 | |
save_autocompletion_dict()
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
2171 2172 | |
save_exit()
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1853 1854 | |
save_initialized_module(tools_class, spec)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1840 1841 | |
save_instance(instance, modular_id, spec='app', instance_type='file/application', tools_class=None)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1837 1838 | |
save_load(modname, spec='app')
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1906 1907 | |
save_registry_as_enums(directory, filename)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
2180 2181 | |
set_flows(r)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1790 1791 | |
set_logger(debug=False)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1779 1780 | |
show_console(*args, **kwargs)
async
staticmethod
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1771 1772 1773 | |
sprint(text, *args, **kwargs)
staticmethod
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
2004 2005 2006 | |
tb(name=None, mod_name='', helper='', version=None, test=True, restrict_in_virtual_mode=False, api=False, initial=False, exit_f=False, test_only=False, memory_cache=False, file_cache=False, row=False, request_as_kwarg=False, state=None, level=0, memory_cache_max_size=100, memory_cache_ttl=300, samples=None, interface=None, pre_compute=None, post_compute=None, api_methods=None, websocket_handler=None)
¶
A decorator for registering and configuring functions within a module.
This decorator is used to wrap functions with additional functionality such as caching, API conversion, and lifecycle management (initialization and exit). It also handles the registration of the function in the module's function registry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name to register the function under. Defaults to the function's own name. |
None
|
mod_name
|
str
|
The name of the module the function belongs to. |
''
|
helper
|
str
|
A helper string providing additional information about the function. |
''
|
version
|
str or None
|
The version of the function or module. |
None
|
test
|
bool
|
Flag to indicate if the function is for testing purposes. |
True
|
restrict_in_virtual_mode
|
bool
|
Flag to restrict the function in virtual mode. |
False
|
api
|
bool
|
Flag to indicate if the function is part of an API. |
False
|
initial
|
bool
|
Flag to indicate if the function should be executed at initialization. |
False
|
exit_f
|
bool
|
Flag to indicate if the function should be executed at exit. |
False
|
test_only
|
bool
|
Flag to indicate if the function should only be used for testing. |
False
|
memory_cache
|
bool
|
Flag to enable memory caching for the function. |
False
|
request_as_kwarg
|
bool
|
Flag to get request if the fuction is calld from api. |
False
|
file_cache
|
bool
|
Flag to enable file caching for the function. |
False
|
row
|
bool
|
rather to auto wrap the result in Result type default False means no row data aka result type |
False
|
state
|
bool or None
|
Flag to indicate if the function maintains state. |
None
|
level
|
int
|
The level of the function, used for prioritization or categorization. |
0
|
memory_cache_max_size
|
int
|
Maximum size of the memory cache. |
100
|
memory_cache_ttl
|
int
|
Time-to-live for the memory cache entries. |
300
|
samples
|
list or dict or None
|
Samples or examples of function usage. |
None
|
interface
|
str
|
The interface type for the function. |
None
|
pre_compute
|
callable
|
A function to be called before the main function. |
None
|
post_compute
|
callable
|
A function to be called after the main function. |
None
|
api_methods
|
list[str]
|
default ["AUTO"] (GET if not params, POST if params) , GET, POST, PUT or DELETE. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
function |
The decorated function with additional processing and registration capabilities. |
Source code in toolboxv2/utils/system/types.py
2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 | |
wait_for_bg_tasks(timeout=None)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1929 1930 1931 1932 | |
watch_mod(mod_name, spec='app', loc='toolboxv2.mods.', use_thread=True, path_name=None)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1888 1889 | |
web_context()
¶
returns the build index ( toolbox web component )
Source code in toolboxv2/utils/system/types.py
1900 1901 | |
MainTool
¶
Source code in toolboxv2/utils/system/main_tool.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
__init__(*args, **kwargs)
¶
Standard constructor used for arguments pass Do not override. Use ainit instead
Source code in toolboxv2/utils/system/main_tool.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
__initobj()
async
¶
Crutch used for await after spawning
Source code in toolboxv2/utils/system/main_tool.py
174 175 176 177 178 179 180 | |
get_version()
¶
"Returns the version
Source code in toolboxv2/utils/system/main_tool.py
167 168 169 | |
webInstall(user_instance, construct_render)
¶
"Returns a web installer for the given user instance and construct render template
Source code in toolboxv2/utils/system/main_tool.py
164 165 | |
MainToolType
¶
Source code in toolboxv2/utils/system/types.py
1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 | |
load()
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1309 1310 | |
print(message, end='\n', **kwargs)
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1312 1313 | |
return_result(error=ToolBoxError.none, exec_code=0, help_text='', data_info=None, data=None, data_to=None)
staticmethod
¶
proxi attr
Source code in toolboxv2/utils/system/types.py
1300 1301 1302 1303 1304 1305 1306 1307 | |
webInstall(user_instance, construct_render)
¶
"Returns a web installer for the given user instance and construct render template
Source code in toolboxv2/utils/system/types.py
1321 1322 | |
Result
¶
Source code in toolboxv2/utils/system/types.py
626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 | |
__class_getitem__(item)
¶
Enable Result[Type] syntax
Source code in toolboxv2/utils/system/types.py
643 644 645 646 647 648 649 650 651 652 653 | |
binary(data, content_type='application/octet-stream', download_name=None, info='OK', interface=ToolBoxInterfaces.remote)
classmethod
¶
Create a binary data response Result.
Source code in toolboxv2/utils/system/types.py
1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 | |
cast_to(target_type)
¶
Cast result to different type
Source code in toolboxv2/utils/system/types.py
738 739 740 741 742 743 744 745 746 747 748 | |
file(data, filename, content_type=None, info='OK', interface=ToolBoxInterfaces.remote)
classmethod
¶
Create a file download response Result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
File data as bytes or base64 string |
required | |
filename
|
Name of the file for download |
required | |
content_type
|
MIME type of the file (auto-detected if None) |
None
|
|
info
|
Response info text |
'OK'
|
|
interface
|
Target interface |
remote
|
Returns:
| Type | Description |
|---|---|
|
Result object configured for file download |
Source code in toolboxv2/utils/system/types.py
1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 | |
get_type_info()
¶
Get the generic type information
Source code in toolboxv2/utils/system/types.py
750 751 752 | |
is_typed()
¶
Check if result has type information
Source code in toolboxv2/utils/system/types.py
754 755 756 | |
json(data, info='OK', interface=ToolBoxInterfaces.remote, exec_code=0, status_code=None)
classmethod
¶
Create a JSON response Result.
Source code in toolboxv2/utils/system/types.py
970 971 972 973 974 975 976 977 978 979 980 981 982 983 | |
redirect(url, status_code=302, info='Redirect', interface=ToolBoxInterfaces.remote)
classmethod
¶
Create a redirect response.
Source code in toolboxv2/utils/system/types.py
1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 | |
sse(stream_generator, info='OK', interface=ToolBoxInterfaces.remote, cleanup_func=None)
classmethod
¶
Create an Server-Sent Events (SSE) streaming response Result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stream_generator
|
Any
|
A source yielding individual data items. This can be an async generator, sync generator, iterable, or a single item. Each item will be formatted as an SSE event. |
required |
info
|
str
|
Optional help text for the Result. |
'OK'
|
interface
|
ToolBoxInterfaces
|
Optional ToolBoxInterface to target. |
remote
|
cleanup_func
|
Callable[[], None] | Callable[[], T] | Callable[[], AsyncGenerator[T, None]] | None
|
Optional cleanup function to run when the stream ends or is cancelled. |
None
|
#http_headers
|
Optional dictionary of custom HTTP headers for the SSE response. |
required |
Returns:
| Type | Description |
|---|---|
|
A Result object configured for SSE streaming. |
Source code in toolboxv2/utils/system/types.py
929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 | |
stream(stream_generator, content_type='text/event-stream', headers=None, info='OK', interface=ToolBoxInterfaces.remote, cleanup_func=None)
classmethod
¶
Create a streaming response Result. Handles SSE and other stream types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stream_generator
|
Any
|
Any stream source (async generator, sync generator, iterable, or single item). |
required |
content_type
|
str
|
Content-Type header (default: text/event-stream for SSE). |
'text/event-stream'
|
headers
|
dict | None
|
Additional HTTP headers for the response. |
None
|
info
|
str
|
Help text for the result. |
'OK'
|
interface
|
ToolBoxInterfaces
|
Interface to send data to. |
remote
|
cleanup_func
|
Callable[[], None] | Callable[[], T] | Callable[[], AsyncGenerator[T, None]] | None
|
Optional function for cleanup. |
None
|
Returns:
| Type | Description |
|---|---|
|
A Result object configured for streaming. |
Source code in toolboxv2/utils/system/types.py
851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 | |
text(text_data, content_type='text/plain', exec_code=None, status=200, info='OK', interface=ToolBoxInterfaces.remote, headers=None)
classmethod
¶
Create a text response Result with specific content type.
Source code in toolboxv2/utils/system/types.py
985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 | |
typed_aget(key=None, default=None)
async
¶
Async get data with type validation
Source code in toolboxv2/utils/system/types.py
667 668 669 670 671 672 673 674 675 676 | |
typed_get(key=None, default=None)
¶
Get data with type validation
Source code in toolboxv2/utils/system/types.py
655 656 657 658 659 660 661 662 663 664 665 | |
typed_json(data, info='OK', interface=ToolBoxInterfaces.remote, exec_code=0, status_code=None)
classmethod
¶
Create JSON result with type information
Source code in toolboxv2/utils/system/types.py
718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 | |
typed_ok(data, data_info='', info='OK', interface=ToolBoxInterfaces.native)
classmethod
¶
Create OK result with type information
Source code in toolboxv2/utils/system/types.py
705 706 707 708 709 710 711 712 713 714 715 716 | |
all_functions_enums
¶
Automatic generated by ToolBox v = 0.1.22
main_tool
¶
MainTool
¶
Source code in toolboxv2/utils/system/main_tool.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
__init__(*args, **kwargs)
¶Standard constructor used for arguments pass Do not override. Use ainit instead
Source code in toolboxv2/utils/system/main_tool.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
__initobj()
async
¶Crutch used for await after spawning
Source code in toolboxv2/utils/system/main_tool.py
174 175 176 177 178 179 180 | |
get_version()
¶"Returns the version
Source code in toolboxv2/utils/system/main_tool.py
167 168 169 | |
webInstall(user_instance, construct_render)
¶"Returns a web installer for the given user instance and construct render template
Source code in toolboxv2/utils/system/main_tool.py
164 165 | |
get_version_from_pyproject(pyproject_path='../pyproject.toml')
¶
Reads the version from the pyproject.toml file.
Source code in toolboxv2/utils/system/main_tool.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | |
session
¶
Session
¶
Source code in toolboxv2/utils/system/session.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 | |
cleanup()
async
¶Cleanup session resources - should be called before application shutdown
Source code in toolboxv2/utils/system/session.py
344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 | |
state_system
¶
The Task of the State System is : 1 Kep trak of the current state of the ToolBox and its dependency's 2 tracks the shasum of all mod and runnabael 3 the version of all mod
The state : {"utils":{"file_name": {"version":##,"shasum"}} ,"mods":{"file_name": {"version":##,"shasum":##,"src-url":##}} ,"runnable":{"file_name": {"version":##,"shasum":##,"src-url":##}} ,"api":{"file_name": {"version":##,"shasum"}} ,"app":{"file_name": {"version":##,"shasum":##,"src-url":##}} }
trans form state from on to an other.
detect_os_and_arch()
¶
Detect the current operating system and architecture.
Source code in toolboxv2/utils/system/state_system.py
298 299 300 301 302 | |
download_executable(url, file_name)
¶
Attempt to download the executable from the provided URL.
Source code in toolboxv2/utils/system/state_system.py
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 | |
find_highest_zip_version(name_filter, app_version=None, root_dir='mods_sto', version_only=False)
¶
Findet die höchste verfügbare ZIP-Version in einem Verzeichnis basierend auf einem Namensfilter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root_dir
|
str
|
Wurzelverzeichnis für die Suche |
'mods_sto'
|
name_filter
|
str
|
Namensfilter für die ZIP-Dateien |
required |
app_version
|
str
|
Aktuelle App-Version für Kompatibilitätsprüfung |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Pfad zur ZIP-Datei mit der höchsten Version oder None wenn keine gefunden |
Source code in toolboxv2/utils/system/state_system.py
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | |
find_highest_zip_version_entry(name, target_app_version=None, filepath='tbState.yaml')
¶
Findet den Eintrag mit der höchsten ZIP-Version für einen gegebenen Namen und eine optionale Ziel-App-Version in einer YAML-Datei.
:param name: Der Name des gesuchten Eintrags. :param target_app_version: Die Zielversion der App als String (optional). :param filepath: Der Pfad zur YAML-Datei. :return: Den Eintrag mit der höchsten ZIP-Version innerhalb der Ziel-App-Version oder None, falls nicht gefunden.
Source code in toolboxv2/utils/system/state_system.py
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | |
query_executable_url(current_os, machine)
¶
Query a remote URL for a matching executable based on OS and architecture. The file name is built dynamically based on parameters.
Source code in toolboxv2/utils/system/state_system.py
305 306 307 308 309 310 311 312 313 314 315 316 317 | |
types
¶
AppType
¶
Source code in toolboxv2/utils/system/types.py
1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 | |
debug
property
writable
¶proxi attr
a_exit()
async
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1903 1904 | |
a_fuction_runner(function, function_data, args, kwargs)
async
¶parameters = function_data.get('params') modular_name = function_data.get('module_name') function_name = function_data.get('func_name') mod_function_name = f"{modular_name}.{function_name}"
proxi attr
Source code in toolboxv2/utils/system/types.py
1968 1969 1970 1971 1972 1973 1974 1975 1976 | |
a_remove_mod(mod_name, spec='app', delete=True)
async
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1894 1895 | |
a_run_any(mod_function_name, backwords_compability_variabel_string_holder=None, get_results=False, tb_run_function_with_state=True, tb_run_with_specification='app', args_=None, kwargs_=None, *args, **kwargs)
async
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1990 1991 1992 1993 1994 1995 | |
a_run_function(mod_function_name, tb_run_function_with_state=True, tb_run_with_specification='app', args_=None, kwargs_=None, *args, **kwargs)
async
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1948 1949 1950 1951 1952 1953 1954 1955 1956 | |
debug_rains(e)
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1787 1788 | |
disconnect(*args, **kwargs)
async
staticmethod
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1775 1776 1777 | |
execute_all_functions(m_query='', f_query='', enable_profiling=True)
async
¶Execute all functions with parallel processing and optional profiling.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
m_query
|
str
|
Module name query filter |
''
|
f_query
|
str
|
Function name query filter |
''
|
enable_profiling
|
bool
|
Enable detailed profiling information |
True
|
Source code in toolboxv2/utils/system/types.py
2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 | |
exit()
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1897 1898 | |
exit_main(*args, **kwargs)
staticmethod
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1763 1764 1765 | |
footprint(update_tracking=True)
¶Erfasst den aktuellen Ressourcen-Footprint der Toolbox-Instanz.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
update_tracking
|
bool
|
Wenn True, aktualisiert Min/Max/Avg-Tracking |
True
|
Returns:
| Type | Description |
|---|---|
FootprintMetrics
|
FootprintMetrics mit allen erfassten Metriken |
Source code in toolboxv2/utils/system/types.py
1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 | |
fuction_runner(function, function_data, args, kwargs, t0=0.0)
¶parameters = function_data.get('params') modular_name = function_data.get('module_name') function_name = function_data.get('func_name') mod_function_name = f"{modular_name}.{function_name}"
proxi attr
Source code in toolboxv2/utils/system/types.py
1958 1959 1960 1961 1962 1963 1964 1965 1966 | |
get_all_mods(working_dir='mods', path_to='./runtime')
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1868 1869 | |
get_autocompletion_dict()
¶proxi attr
Source code in toolboxv2/utils/system/types.py
2174 2175 | |
get_function(name, **kwargs)
¶Kwargs for _get_function metadata:: return the registered function dictionary stateless: (function_data, None), 0 stateful: (function_data, higher_order_function), 0 state::boolean specification::str default app
Source code in toolboxv2/utils/system/types.py
1909 1910 1911 1912 1913 1914 1915 1916 1917 | |
get_mod(name, spec='app')
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1997 1998 | |
get_username(get_input=False, default='loot')
¶proxi attr
Source code in toolboxv2/utils/system/types.py
2177 2178 | |
hide_console(*args, **kwargs)
async
staticmethod
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1767 1768 1769 | |
inplace_load_instance(mod_name, loc='toolboxv2.mods.', spec='app', save=True)
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1834 1835 | |
load_all_mods_in_file(working_dir='mods')
async
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1865 1866 | |
load_external_mods()
async
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1862 1863 | |
load_mod(mod_name, mlm='I', **kwargs)
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1856 1857 | |
mod_online(mod_name, installed=False)
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1843 1844 | |
print(text, *args, **kwargs)
staticmethod
¶proxi attr
Source code in toolboxv2/utils/system/types.py
2000 2001 2002 | |
print_footprint(detailed=True)
¶Gibt den Footprint formatiert aus.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
detailed
|
bool
|
Wenn True, zeigt alle Details, sonst nur Zusammenfassung |
True
|
Returns:
| Type | Description |
|---|---|
str
|
Formatierter Footprint-String |
Source code in toolboxv2/utils/system/types.py
1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 | |
print_ok()
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1881 1882 1883 | |
reload_mod(mod_name, spec='app', is_file=True, loc='toolboxv2.mods.')
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1885 1886 | |
remove_mod(mod_name, spec='app', delete=True)
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1891 1892 | |
rrun_flows(name, **kwargs)
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1796 1797 | |
run_a_from_sync(function, *args)
¶run a async fuction
Source code in toolboxv2/utils/system/types.py
1919 1920 1921 1922 | |
run_any(mod_function_name, backwords_compability_variabel_string_holder=None, get_results=False, tb_run_function_with_state=True, tb_run_with_specification='app', args_=None, kwargs_=None, *args, **kwargs)
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1984 1985 1986 1987 1988 | |
run_bg_task(task)
¶run a async fuction
Source code in toolboxv2/utils/system/types.py
1934 1935 1936 1937 | |
run_bg_task_advanced(task, *args, **kwargs)
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1924 1925 1926 1927 | |
run_flows(name, **kwargs)
async
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1793 1794 | |
run_function(mod_function_name, tb_run_function_with_state=True, tb_run_with_specification='app', args_=None, kwargs_=None, *args, **kwargs)
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1938 1939 1940 1941 1942 1943 1944 1945 1946 | |
run_http(mod_function_name, function_name=None, method='GET', args_=None, kwargs_=None, *args, **kwargs)
async
¶run a function remote via http / https
Source code in toolboxv2/utils/system/types.py
1978 1979 1980 1981 1982 | |
save_autocompletion_dict()
¶proxi attr
Source code in toolboxv2/utils/system/types.py
2171 2172 | |
save_exit()
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1853 1854 | |
save_initialized_module(tools_class, spec)
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1840 1841 | |
save_instance(instance, modular_id, spec='app', instance_type='file/application', tools_class=None)
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1837 1838 | |
save_load(modname, spec='app')
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1906 1907 | |
save_registry_as_enums(directory, filename)
¶proxi attr
Source code in toolboxv2/utils/system/types.py
2180 2181 | |
set_flows(r)
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1790 1791 | |
set_logger(debug=False)
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1779 1780 | |
show_console(*args, **kwargs)
async
staticmethod
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1771 1772 1773 | |
sprint(text, *args, **kwargs)
staticmethod
¶proxi attr
Source code in toolboxv2/utils/system/types.py
2004 2005 2006 | |
tb(name=None, mod_name='', helper='', version=None, test=True, restrict_in_virtual_mode=False, api=False, initial=False, exit_f=False, test_only=False, memory_cache=False, file_cache=False, row=False, request_as_kwarg=False, state=None, level=0, memory_cache_max_size=100, memory_cache_ttl=300, samples=None, interface=None, pre_compute=None, post_compute=None, api_methods=None, websocket_handler=None)
¶A decorator for registering and configuring functions within a module.
This decorator is used to wrap functions with additional functionality such as caching, API conversion, and lifecycle management (initialization and exit). It also handles the registration of the function in the module's function registry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name to register the function under. Defaults to the function's own name. |
None
|
mod_name
|
str
|
The name of the module the function belongs to. |
''
|
helper
|
str
|
A helper string providing additional information about the function. |
''
|
version
|
str or None
|
The version of the function or module. |
None
|
test
|
bool
|
Flag to indicate if the function is for testing purposes. |
True
|
restrict_in_virtual_mode
|
bool
|
Flag to restrict the function in virtual mode. |
False
|
api
|
bool
|
Flag to indicate if the function is part of an API. |
False
|
initial
|
bool
|
Flag to indicate if the function should be executed at initialization. |
False
|
exit_f
|
bool
|
Flag to indicate if the function should be executed at exit. |
False
|
test_only
|
bool
|
Flag to indicate if the function should only be used for testing. |
False
|
memory_cache
|
bool
|
Flag to enable memory caching for the function. |
False
|
request_as_kwarg
|
bool
|
Flag to get request if the fuction is calld from api. |
False
|
file_cache
|
bool
|
Flag to enable file caching for the function. |
False
|
row
|
bool
|
rather to auto wrap the result in Result type default False means no row data aka result type |
False
|
state
|
bool or None
|
Flag to indicate if the function maintains state. |
None
|
level
|
int
|
The level of the function, used for prioritization or categorization. |
0
|
memory_cache_max_size
|
int
|
Maximum size of the memory cache. |
100
|
memory_cache_ttl
|
int
|
Time-to-live for the memory cache entries. |
300
|
samples
|
list or dict or None
|
Samples or examples of function usage. |
None
|
interface
|
str
|
The interface type for the function. |
None
|
pre_compute
|
callable
|
A function to be called before the main function. |
None
|
post_compute
|
callable
|
A function to be called after the main function. |
None
|
api_methods
|
list[str]
|
default ["AUTO"] (GET if not params, POST if params) , GET, POST, PUT or DELETE. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
function |
The decorated function with additional processing and registration capabilities. |
Source code in toolboxv2/utils/system/types.py
2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 | |
wait_for_bg_tasks(timeout=None)
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1929 1930 1931 1932 | |
watch_mod(mod_name, spec='app', loc='toolboxv2.mods.', use_thread=True, path_name=None)
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1888 1889 | |
web_context()
¶returns the build index ( toolbox web component )
Source code in toolboxv2/utils/system/types.py
1900 1901 | |
FootprintMetrics
¶
Dataclass für Footprint-Metriken
Source code in toolboxv2/utils/system/types.py
1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 | |
to_dict()
¶Konvertiert Metriken in Dictionary
Source code in toolboxv2/utils/system/types.py
1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 | |
Headers
¶
Class representing HTTP headers with strongly typed common fields.
Source code in toolboxv2/utils/system/types.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | |
__post_init__()
¶Convert header keys with hyphens to underscores for attribute access.
Source code in toolboxv2/utils/system/types.py
161 162 163 164 165 166 167 168 169 170 171 172 | |
from_dict(headers_dict)
classmethod
¶Create a Headers instance from a dictionary.
Source code in toolboxv2/utils/system/types.py
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | |
to_dict()
¶Convert the Headers object back to a dictionary.
Source code in toolboxv2/utils/system/types.py
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | |
MainToolType
¶
Source code in toolboxv2/utils/system/types.py
1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 | |
load()
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1309 1310 | |
print(message, end='\n', **kwargs)
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1312 1313 | |
return_result(error=ToolBoxError.none, exec_code=0, help_text='', data_info=None, data=None, data_to=None)
staticmethod
¶proxi attr
Source code in toolboxv2/utils/system/types.py
1300 1301 1302 1303 1304 1305 1306 1307 | |
webInstall(user_instance, construct_render)
¶"Returns a web installer for the given user instance and construct render template
Source code in toolboxv2/utils/system/types.py
1321 1322 | |
Request
¶
Class representing an HTTP request.
Source code in toolboxv2/utils/system/types.py
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | |
from_dict(data)
classmethod
¶Create a Request instance from a dictionary.
Source code in toolboxv2/utils/system/types.py
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 | |
to_dict()
¶Convert the Request object back to a dictionary.
Source code in toolboxv2/utils/system/types.py
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | |
RequestData
¶
Main class representing the complete request data structure.
Source code in toolboxv2/utils/system/types.py
302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 | |
__getattr__(name)
¶Delegate unknown attributes to the request object.
Source code in toolboxv2/utils/system/types.py
326 327 328 329 330 331 332 | |
from_dict(data)
classmethod
¶Create a RequestData instance from a dictionary.
Source code in toolboxv2/utils/system/types.py
309 310 311 312 313 314 315 316 | |
to_dict()
¶Convert the RequestData object back to a dictionary.
Source code in toolboxv2/utils/system/types.py
318 319 320 321 322 323 324 | |
Result
¶
Source code in toolboxv2/utils/system/types.py
626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 | |
__class_getitem__(item)
¶Enable Result[Type] syntax
Source code in toolboxv2/utils/system/types.py
643 644 645 646 647 648 649 650 651 652 653 | |
binary(data, content_type='application/octet-stream', download_name=None, info='OK', interface=ToolBoxInterfaces.remote)
classmethod
¶Create a binary data response Result.
Source code in toolboxv2/utils/system/types.py
1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 | |
cast_to(target_type)
¶Cast result to different type
Source code in toolboxv2/utils/system/types.py
738 739 740 741 742 743 744 745 746 747 748 | |
file(data, filename, content_type=None, info='OK', interface=ToolBoxInterfaces.remote)
classmethod
¶Create a file download response Result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
File data as bytes or base64 string |
required | |
filename
|
Name of the file for download |
required | |
content_type
|
MIME type of the file (auto-detected if None) |
None
|
|
info
|
Response info text |
'OK'
|
|
interface
|
Target interface |
remote
|
Returns:
| Type | Description |
|---|---|
|
Result object configured for file download |
Source code in toolboxv2/utils/system/types.py
1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 | |
get_type_info()
¶Get the generic type information
Source code in toolboxv2/utils/system/types.py
750 751 752 | |
is_typed()
¶Check if result has type information
Source code in toolboxv2/utils/system/types.py
754 755 756 | |
json(data, info='OK', interface=ToolBoxInterfaces.remote, exec_code=0, status_code=None)
classmethod
¶Create a JSON response Result.
Source code in toolboxv2/utils/system/types.py
970 971 972 973 974 975 976 977 978 979 980 981 982 983 | |
redirect(url, status_code=302, info='Redirect', interface=ToolBoxInterfaces.remote)
classmethod
¶Create a redirect response.
Source code in toolboxv2/utils/system/types.py
1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 | |
sse(stream_generator, info='OK', interface=ToolBoxInterfaces.remote, cleanup_func=None)
classmethod
¶Create an Server-Sent Events (SSE) streaming response Result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stream_generator
|
Any
|
A source yielding individual data items. This can be an async generator, sync generator, iterable, or a single item. Each item will be formatted as an SSE event. |
required |
info
|
str
|
Optional help text for the Result. |
'OK'
|
interface
|
ToolBoxInterfaces
|
Optional ToolBoxInterface to target. |
remote
|
cleanup_func
|
Callable[[], None] | Callable[[], T] | Callable[[], AsyncGenerator[T, None]] | None
|
Optional cleanup function to run when the stream ends or is cancelled. |
None
|
#http_headers
|
Optional dictionary of custom HTTP headers for the SSE response. |
required |
Returns:
| Type | Description |
|---|---|
|
A Result object configured for SSE streaming. |
Source code in toolboxv2/utils/system/types.py
929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 | |
stream(stream_generator, content_type='text/event-stream', headers=None, info='OK', interface=ToolBoxInterfaces.remote, cleanup_func=None)
classmethod
¶Create a streaming response Result. Handles SSE and other stream types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stream_generator
|
Any
|
Any stream source (async generator, sync generator, iterable, or single item). |
required |
content_type
|
str
|
Content-Type header (default: text/event-stream for SSE). |
'text/event-stream'
|
headers
|
dict | None
|
Additional HTTP headers for the response. |
None
|
info
|
str
|
Help text for the result. |
'OK'
|
interface
|
ToolBoxInterfaces
|
Interface to send data to. |
remote
|
cleanup_func
|
Callable[[], None] | Callable[[], T] | Callable[[], AsyncGenerator[T, None]] | None
|
Optional function for cleanup. |
None
|
Returns:
| Type | Description |
|---|---|
|
A Result object configured for streaming. |
Source code in toolboxv2/utils/system/types.py
851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 | |
text(text_data, content_type='text/plain', exec_code=None, status=200, info='OK', interface=ToolBoxInterfaces.remote, headers=None)
classmethod
¶Create a text response Result with specific content type.
Source code in toolboxv2/utils/system/types.py
985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 | |
typed_aget(key=None, default=None)
async
¶Async get data with type validation
Source code in toolboxv2/utils/system/types.py
667 668 669 670 671 672 673 674 675 676 | |
typed_get(key=None, default=None)
¶Get data with type validation
Source code in toolboxv2/utils/system/types.py
655 656 657 658 659 660 661 662 663 664 665 | |
typed_json(data, info='OK', interface=ToolBoxInterfaces.remote, exec_code=0, status_code=None)
classmethod
¶Create JSON result with type information
Source code in toolboxv2/utils/system/types.py
718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 | |
typed_ok(data, data_info='', info='OK', interface=ToolBoxInterfaces.native)
classmethod
¶Create OK result with type information
Source code in toolboxv2/utils/system/types.py
705 706 707 708 709 710 711 712 713 714 715 716 | |
SSEGenerator
¶
Production-ready SSE generator that converts any data source to properly formatted Server-Sent Events compatible with browsers.
Source code in toolboxv2/utils/system/types.py
2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 | |
create_sse_stream(source, cleanup_func=None)
async
classmethod
¶Convert any source to a properly formatted SSE stream.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
Any
|
Can be async generator, sync generator, iterable, or a single item. |
required |
cleanup_func
|
Callable[[], None] | Callable[[], T] | Callable[[], AsyncGenerator[T, None]] | None
|
Optional function to call when the stream ends or is cancelled. Can be a synchronous function, async function, or async generator. |
None
|
Yields:
| Type | Description |
|---|---|
AsyncGenerator[str, None]
|
Properly formatted SSE messages (strings). |
Source code in toolboxv2/utils/system/types.py
2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 | |
format_sse_event(data)
staticmethod
¶Format any data as a proper SSE event message.
Source code in toolboxv2/utils/system/types.py
2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 | |
wrap_sync_generator(generator)
async
classmethod
¶Convert a synchronous generator to an async generator.
Source code in toolboxv2/utils/system/types.py
2574 2575 2576 2577 2578 2579 2580 | |
Session
¶
Class representing a session.
Source code in toolboxv2/utils/system/types.py
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | |
from_dict(data)
classmethod
¶Create a Session instance from a dictionary with default values.
Source code in toolboxv2/utils/system/types.py
270 271 272 273 274 275 276 277 278 279 280 281 | |
to_dict()
¶Convert the Session object back to a dictionary.
Source code in toolboxv2/utils/system/types.py
283 284 285 286 287 288 289 290 291 292 293 294 295 | |
parse_request_data(data)
¶
Parse the incoming request data into a strongly typed structure.
Source code in toolboxv2/utils/system/types.py
382 383 384 | |
tbx
¶
install_support
¶
Complete TB Language Setup - Build executable - Setup file associations - Install VS Code extension - Install PyCharm plugin
TBSetup
¶
Complete TB Language setup manager
Source code in toolboxv2/utils/tbx/install_support.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 | |
build_executable()
¶Step 1: Build TB Language
Source code in toolboxv2/utils/tbx/install_support.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
build_pycharm_plugin()
¶Build PyCharm plugin JAR
Source code in toolboxv2/utils/tbx/install_support.py
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 | |
create_pycharm_plugin()
¶Create PyCharm plugin structure
Source code in toolboxv2/utils/tbx/install_support.py
199 200 201 202 203 204 205 206 207 208 | |
find_pycharm_config_dirs()
¶Find PyCharm config directories
Source code in toolboxv2/utils/tbx/install_support.py
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 | |
install_pycharm_plugin()
¶Install plugin to PyCharm
Source code in toolboxv2/utils/tbx/install_support.py
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | |
setup_all()
¶Run complete setup
Source code in toolboxv2/utils/tbx/install_support.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | |
setup_pycharm()
¶Step 4: PyCharm plugin
Source code in toolboxv2/utils/tbx/install_support.py
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | |
setup_system_integration()
¶Step 2: System integration
Source code in toolboxv2/utils/tbx/install_support.py
90 91 92 93 94 95 96 97 98 99 100 101 102 | |
setup_vscode()
¶Step 3: VS Code extension
Source code in toolboxv2/utils/tbx/install_support.py
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | |
main()
¶
Main entry point
Source code in toolboxv2/utils/tbx/install_support.py
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 | |
setup
¶
TB Language Setup Utility - File association (.tbx files) - Icon registration - Desktop integration
TBxSetup
¶
Setup utility for TB Language file associations and icons
Source code in toolboxv2/utils/tbx/setup.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 | |
get_executable()
¶Get TB executable path
Source code in toolboxv2/utils/tbx/setup.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | |
get_tb_root()
¶Get toolbox root directory
Source code in toolboxv2/utils/tbx/setup.py
26 27 28 29 30 31 32 | |
setup_all()
¶Run complete setup
Source code in toolboxv2/utils/tbx/setup.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | |
setup_icon()
¶Setup icon file
Source code in toolboxv2/utils/tbx/setup.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | |
setup_linux()
¶Setup file association on Linux
Source code in toolboxv2/utils/tbx/setup.py
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | |
setup_macos()
¶Setup file association on macOS
Source code in toolboxv2/utils/tbx/setup.py
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 | |
setup_windows()
¶Setup file association on Windows
Source code in toolboxv2/utils/tbx/setup.py
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | |
uninstall()
¶Remove file associations
Source code in toolboxv2/utils/tbx/setup.py
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 | |
main()
¶
Main entry point
Source code in toolboxv2/utils/tbx/setup.py
410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 | |
test
¶
test_tb_lang
¶
TB Language Comprehensive Test Suite Tests all features of the TB language implementation.
Usage
python test_tb_lang.py python test_tb_lang.py --verbose python test_tb_lang.py --filter "test_arithmetic"
assert_contains(code, substring, mode='jit')
¶Assert that output contains substring.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
352 353 354 355 356 357 358 359 360 361 362 | |
assert_output(code, expected, mode='jit')
¶Assert that TB code produces expected output.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | |
assert_success(code, mode='jit')
¶Assert that TB code runs without error.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
338 339 340 341 342 343 344 345 346 347 348 349 | |
find_tb_binary()
¶Find TB binary, trying multiple paths with system-specific extensions.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |
run_tb(code, mode='jit', timeout=10)
¶Run TB code and return (success, stdout, stderr).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
code
|
str
|
TB source code |
required |
mode
|
str
|
Execution mode (jit, compiled, streaming) |
'jit'
|
timeout
|
int
|
Timeout in seconds |
10
|
Returns:
| Type | Description |
|---|---|
Tuple[bool, str, str]
|
(success, stdout, stderr) |
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | |
run_tb_compile(code, output_path, target=None)
¶Compile TB code to binary.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | |
test(name, category='General')
¶Decorator for test functions.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 | |
test_compiled_arithmetic()
¶Test basic arithmetic in compiled mode
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 | |
test_compiled_functions()
¶Test function definitions in compiled mode
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 | |
test_compiled_functions_no_compiled_()
¶Test function definitions in compiled mode
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 | |
test_compiled_loops()
¶Test loops in compiled mode
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 | |
test_compiled_parallel()
¶Test parallel execution in compiled mode
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 | |
test_compiled_parallel_with_imports()
¶Test parallel execution with imported functions
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 | |
test_go_basic_execution()
¶Test that Go code can be executed.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 | |
test_go_bridge_compiled_mode()
¶Test that the Go language bridge works in compiled mode.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 | |
test_go_import_json()
¶Test marshalling data to JSON using Go's 'encoding/json' package.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 | |
test_go_import_math()
¶Test using the Go 'math' standard library package.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 | |
test_go_import_strings()
¶Test using the Go 'strings' package with a TB variable.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 | |
test_go_multilang_python_to_go()
¶Test data flow from a Python block to a Go block.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 | |
test_import_cache_invalidation()
¶Test that cache is invalidated when source changes
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 | |
test_import_compiled_caching()
¶Test that compiled imports are cached
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 | |
test_import_compiled_mode()
¶Test that imports work in compiled mode
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 | |
test_import_dependency_chain()
¶Test imports that depend on other imports
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 | |
test_import_jit_vs_compiled()
¶Test that JIT imports don't get compiled
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 | |
test_import_missing_file()
¶Test error handling for missing import files
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 | |
test_import_multiple_files()
¶Test importing multiple .tbx files
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 | |
test_import_no_circular()
¶Test that circular imports are handled (imports are not recursive)
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 | |
test_import_relative_paths()
¶Test importing with relative directory paths
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 | |
test_import_single_file()
¶Test importing a single .tbx file
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 | |
test_import_with_variables()
¶Test importing file with global variables
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 | |
test_mixed_full_stack()
¶Comprehensive test with all features combined
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 | |
test_mixed_import_async_language()
¶Test imports with async and language bridges
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 | |
test_mixed_multiple_imports_parallel()
¶Test multiple imports with parallel execution
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 | |
test_mixed_shared_imports()
¶Test shared variables with imports
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 | |
test_mixed_shared_imports_mixed_lang()
¶Test shared variables with imports
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 | |
test_type_annotations()
¶Test that type annotations are correctly handled.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 | |
test_type_annotations_()
¶Test that type annotations are correctly handled.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 | |
test_type_annotations_auto()
¶Test that type annotations are correctly handled.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 | |
test_type_annotations_auto_compiled()
¶Test that type annotations are correctly handled.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 | |
test_type_annotations_compiled()
¶Test that type annotations are correctly handled.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 | |
test_tb_lang2
¶
TB Language Comprehensive Test Suite Tests all features of the TB language implementation.
Usage
python test_tb_lang.py python test_tb_lang.py --verbose python test_tb_lang.py --filter "test_arithmetic" python test_tb_lang.py --mode jit python test_tb_lang.py --mode compiled python test_tb_lang.py --skip-slow
TestSuite
¶Source code in toolboxv2/utils/tbx/test/test_tb_lang2.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | |
load_failed_tests()
¶Load previously failed test names from cache.
Source code in toolboxv2/utils/tbx/test/test_tb_lang2.py
84 85 86 87 88 89 90 91 92 93 94 | |
save_failed_tests()
¶Save failed test names to cache.
Source code in toolboxv2/utils/tbx/test/test_tb_lang2.py
96 97 98 99 100 101 | |
should_run_test(test_name)
¶Check if test should run based on FAILED_ONLY flag.
Source code in toolboxv2/utils/tbx/test/test_tb_lang2.py
103 104 105 106 107 | |
assert_contains(code, substring, mode='jit')
¶Assert that output contains substring.
Source code in toolboxv2/utils/tbx/test/test_tb_lang2.py
401 402 403 404 405 406 407 408 409 | |
assert_error(code, mode='jit')
¶Assert that code fails.
Source code in toolboxv2/utils/tbx/test/test_tb_lang2.py
412 413 414 415 416 417 | |
assert_output(code, expected, mode='jit')
¶Assert that TB code produces expected output.
Source code in toolboxv2/utils/tbx/test/test_tb_lang2.py
372 373 374 375 376 377 378 379 380 381 382 383 384 385 | |
assert_output_with_tcp_server(code, expected, mode='jit', host='localhost', port=8085)
¶Run code while a temporary TCP server is alive. The server accepts a single connection, reads once, then closes.
Source code in toolboxv2/utils/tbx/test/test_tb_lang2.py
423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 | |
assert_success(code, mode='jit')
¶Assert that TB code runs without error.
Source code in toolboxv2/utils/tbx/test/test_tb_lang2.py
388 389 390 391 392 393 394 395 396 397 398 | |
escape_path_for_tb(path)
¶Escape path for TB string literals.
Source code in toolboxv2/utils/tbx/test/test_tb_lang2.py
3677 3678 3679 | |
find_tb_binary()
¶Find TB binary in multiple locations.
Source code in toolboxv2/utils/tbx/test/test_tb_lang2.py
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | |
load_failed_tests()
¶Load failed test names from file.
Source code in toolboxv2/utils/tbx/test/test_tb_lang2.py
222 223 224 225 226 227 228 229 230 | |
save_failed_tests(failed_names)
¶Save failed test names to file.
Source code in toolboxv2/utils/tbx/test/test_tb_lang2.py
213 214 215 216 217 218 219 220 | |
tbx_setup
¶
TB Language Setup Utility - File association (.tbx files) - Icon registration - Desktop integration
TBxSetup
¶
Setup utility for TB Language file associations and icons
Source code in toolboxv2/utils/tbx/setup.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 | |
get_executable()
¶
Get TB executable path
Source code in toolboxv2/utils/tbx/setup.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | |
get_tb_root()
¶
Get toolbox root directory
Source code in toolboxv2/utils/tbx/setup.py
26 27 28 29 30 31 32 | |
setup_all()
¶
Run complete setup
Source code in toolboxv2/utils/tbx/setup.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | |
setup_icon()
¶
Setup icon file
Source code in toolboxv2/utils/tbx/setup.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | |
setup_linux()
¶
Setup file association on Linux
Source code in toolboxv2/utils/tbx/setup.py
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | |
setup_macos()
¶
Setup file association on macOS
Source code in toolboxv2/utils/tbx/setup.py
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 | |
setup_windows()
¶
Setup file association on Windows
Source code in toolboxv2/utils/tbx/setup.py
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | |
uninstall()
¶
Remove file associations
Source code in toolboxv2/utils/tbx/setup.py
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 | |
main()
¶
Main entry point
Source code in toolboxv2/utils/tbx/setup.py
410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 | |
test_tb_lang
¶
TB Language Comprehensive Test Suite Tests all features of the TB language implementation.
Usage
python test_tb_lang.py python test_tb_lang.py --verbose python test_tb_lang.py --filter "test_arithmetic"
assert_contains(code, substring, mode='jit')
¶
Assert that output contains substring.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
352 353 354 355 356 357 358 359 360 361 362 | |
assert_output(code, expected, mode='jit')
¶
Assert that TB code produces expected output.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | |
assert_success(code, mode='jit')
¶
Assert that TB code runs without error.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
338 339 340 341 342 343 344 345 346 347 348 349 | |
find_tb_binary()
¶
Find TB binary, trying multiple paths with system-specific extensions.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |
run_tb(code, mode='jit', timeout=10)
¶
Run TB code and return (success, stdout, stderr).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
code
|
str
|
TB source code |
required |
mode
|
str
|
Execution mode (jit, compiled, streaming) |
'jit'
|
timeout
|
int
|
Timeout in seconds |
10
|
Returns:
| Type | Description |
|---|---|
Tuple[bool, str, str]
|
(success, stdout, stderr) |
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | |
run_tb_compile(code, output_path, target=None)
¶
Compile TB code to binary.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | |
test(name, category='General')
¶
Decorator for test functions.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 | |
test_compiled_arithmetic()
¶
Test basic arithmetic in compiled mode
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 | |
test_compiled_functions()
¶
Test function definitions in compiled mode
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 | |
test_compiled_functions_no_compiled_()
¶
Test function definitions in compiled mode
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 | |
test_compiled_loops()
¶
Test loops in compiled mode
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 | |
test_compiled_parallel()
¶
Test parallel execution in compiled mode
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 | |
test_compiled_parallel_with_imports()
¶
Test parallel execution with imported functions
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 | |
test_go_basic_execution()
¶
Test that Go code can be executed.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 | |
test_go_bridge_compiled_mode()
¶
Test that the Go language bridge works in compiled mode.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 | |
test_go_import_json()
¶
Test marshalling data to JSON using Go's 'encoding/json' package.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 | |
test_go_import_math()
¶
Test using the Go 'math' standard library package.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 | |
test_go_import_strings()
¶
Test using the Go 'strings' package with a TB variable.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 | |
test_go_multilang_python_to_go()
¶
Test data flow from a Python block to a Go block.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 | |
test_import_cache_invalidation()
¶
Test that cache is invalidated when source changes
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 | |
test_import_compiled_caching()
¶
Test that compiled imports are cached
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 | |
test_import_compiled_mode()
¶
Test that imports work in compiled mode
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 | |
test_import_dependency_chain()
¶
Test imports that depend on other imports
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 | |
test_import_jit_vs_compiled()
¶
Test that JIT imports don't get compiled
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 | |
test_import_missing_file()
¶
Test error handling for missing import files
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 | |
test_import_multiple_files()
¶
Test importing multiple .tbx files
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 | |
test_import_no_circular()
¶
Test that circular imports are handled (imports are not recursive)
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 | |
test_import_relative_paths()
¶
Test importing with relative directory paths
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 | |
test_import_single_file()
¶
Test importing a single .tbx file
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 | |
test_import_with_variables()
¶
Test importing file with global variables
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 | |
test_mixed_full_stack()
¶
Comprehensive test with all features combined
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 | |
test_mixed_import_async_language()
¶
Test imports with async and language bridges
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 | |
test_mixed_multiple_imports_parallel()
¶
Test multiple imports with parallel execution
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 | |
test_mixed_shared_imports()
¶
Test shared variables with imports
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 | |
test_mixed_shared_imports_mixed_lang()
¶
Test shared variables with imports
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 | |
test_type_annotations()
¶
Test that type annotations are correctly handled.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 | |
test_type_annotations_()
¶
Test that type annotations are correctly handled.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 | |
test_type_annotations_auto()
¶
Test that type annotations are correctly handled.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 | |
test_type_annotations_auto_compiled()
¶
Test that type annotations are correctly handled.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 | |
test_type_annotations_compiled()
¶
Test that type annotations are correctly handled.
Source code in toolboxv2/utils/tbx/test/test_tb_lang.py
3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 | |
toolbox
¶
Main module.
App
¶
Source code in toolboxv2/utils/toolbox.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 | |
disconnect(*args, **kwargs)
staticmethod
¶
proxi attr
Source code in toolboxv2/utils/toolbox.py
244 245 246 | |
exit_main(*args, **kwargs)
staticmethod
¶
proxi attr
Source code in toolboxv2/utils/toolbox.py
232 233 234 | |
get_function(name, **kwargs)
¶
Kwargs for _get_function metadata:: return the registered function dictionary stateless: (function_data, None), 0 stateful: (function_data, higher_order_function), 0 state::boolean specification::str default app
Source code in toolboxv2/utils/toolbox.py
1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 | |
hide_console(*args, **kwargs)
staticmethod
¶
proxi attr
Source code in toolboxv2/utils/toolbox.py
236 237 238 | |
init_mod(mod_name, spec='app')
¶
Initializes a module in a thread-safe manner by submitting the asynchronous initialization to the running event loop.
Source code in toolboxv2/utils/toolbox.py
625 626 627 628 629 630 631 632 | |
run(*args, request=None, running_function_coro=None, **kwargs)
¶
Run a function with support for SSE streaming in both threaded and non-threaded contexts.
Source code in toolboxv2/utils/toolbox.py
790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 | |
run_bg_task(task, *args, **kwargs)
¶
Runs a coroutine in the background without blocking the caller.
This is the primary method for "fire-and-forget" async tasks. It schedules the coroutine to run on the application's main event loop.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
Callable
|
The coroutine function to run. |
required |
*args
|
Arguments to pass to the coroutine function. |
()
|
|
**kwargs
|
Keyword arguments to pass to the coroutine function. |
{}
|
Returns:
| Type | Description |
|---|---|
Task | None
|
An asyncio.Task object representing the scheduled task, or None if |
Task | None
|
the task could not be scheduled. |
Source code in toolboxv2/utils/toolbox.py
645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 | |
run_bg_task_advanced(task, *args, **kwargs)
¶
Runs a task in a separate, dedicated background thread with its own event loop.
This is ideal for: 1. Running an async task from a synchronous context. 2. Launching a long-running, independent operation that should not interfere with the main application's event loop.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
Callable
|
The function to run (can be sync or async). |
required |
*args
|
Arguments for the task. |
()
|
|
**kwargs
|
Keyword arguments for the task. |
{}
|
Returns:
| Type | Description |
|---|---|
Thread
|
The threading.Thread object managing the background execution. |
Source code in toolboxv2/utils/toolbox.py
700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 | |
show_console(*args, **kwargs)
staticmethod
¶
proxi attr
Source code in toolboxv2/utils/toolbox.py
240 241 242 | |
tb(name=None, mod_name='', helper='', version=None, test=True, restrict_in_virtual_mode=False, api=False, initial=False, exit_f=False, test_only=False, memory_cache=False, file_cache=False, request_as_kwarg=False, row=False, state=None, level=-1, memory_cache_max_size=100, memory_cache_ttl=300, samples=None, interface=None, pre_compute=None, post_compute=None, api_methods=None, websocket_handler=None)
¶
A decorator for registering and configuring functions within a module.
This decorator is used to wrap functions with additional functionality such as caching, API conversion, and lifecycle management (initialization and exit). It also handles the registration of the function in the module's function registry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name to register the function under. Defaults to the function's own name. |
None
|
mod_name
|
str
|
The name of the module the function belongs to. |
''
|
helper
|
str
|
A helper string providing additional information about the function. |
''
|
version
|
str or None
|
The version of the function or module. |
None
|
test
|
bool
|
Flag to indicate if the function is for testing purposes. |
True
|
restrict_in_virtual_mode
|
bool
|
Flag to restrict the function in virtual mode. |
False
|
api
|
bool
|
Flag to indicate if the function is part of an API. |
False
|
initial
|
bool
|
Flag to indicate if the function should be executed at initialization. |
False
|
exit_f
|
bool
|
Flag to indicate if the function should be executed at exit. |
False
|
test_only
|
bool
|
Flag to indicate if the function should only be used for testing. |
False
|
memory_cache
|
bool
|
Flag to enable memory caching for the function. |
False
|
request_as_kwarg
|
bool
|
Flag to get request if the fuction is calld from api. |
False
|
file_cache
|
bool
|
Flag to enable file caching for the function. |
False
|
row
|
bool
|
rather to auto wrap the result in Result type default False means no row data aka result type |
False
|
state
|
bool or None
|
Flag to indicate if the function maintains state. |
None
|
level
|
int
|
The level of the function, used for prioritization or categorization. |
-1
|
memory_cache_max_size
|
int
|
Maximum size of the memory cache. |
100
|
memory_cache_ttl
|
int
|
Time-to-live for the memory cache entries. |
300
|
samples
|
list or dict or None
|
Samples or examples of function usage. |
None
|
interface
|
str
|
The interface type for the function. |
None
|
pre_compute
|
callable
|
A function to be called before the main function. |
None
|
post_compute
|
callable
|
A function to be called after the main function. |
None
|
api_methods
|
list[str]
|
default ["AUTO"] (GET if not params, POST if params) , GET, POST, PUT or DELETE. |
None
|
websocket_handler
|
str
|
The name of the websocket handler to use. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
function |
The decorated function with additional processing and registration capabilities. |
Source code in toolboxv2/utils/toolbox.py
2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 | |
wait_for_bg_tasks(timeout=None)
¶
Wait for all background tasks to complete.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timeout
|
Maximum time to wait (in seconds) for all tasks to complete. None means wait indefinitely. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
bool |
True if all tasks completed, False if timeout occurred |
Source code in toolboxv2/utils/toolbox.py
767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 | |
ws_broadcast(channel_id, payload, source_conn_id='python_broadcast')
async
¶
Sendet eine Nachricht asynchron an alle Clients in einem Kanal/Raum.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
channel_id
|
str
|
Der Kanal, an den gesendet werden soll. |
required |
payload
|
dict
|
Ein Dictionary, das als JSON gesendet wird. |
required |
source_conn_id
|
optional
|
Die ID der ursprünglichen Verbindung, um Echos zu vermeiden. |
'python_broadcast'
|
Source code in toolboxv2/utils/toolbox.py
2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 | |
ws_send(conn_id, payload)
async
¶
Sendet eine Nachricht asynchron an eine einzelne WebSocket-Verbindung.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
conn_id
|
str
|
Die eindeutige ID der Zielverbindung. |
required |
payload
|
dict
|
Ein Dictionary, das als JSON gesendet wird. |
required |
Source code in toolboxv2/utils/toolbox.py
2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 | |
toolboxv2.show_console(show=True)
¶
Source code in toolboxv2/utils/extras/show_and_hide_console.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | |
Logging¶
toolboxv2.get_logger()
¶
Source code in toolboxv2/utils/system/tb_logger.py
136 137 | |
toolboxv2.setup_logging(level, name=loggerNameOfToolboxv2, online_level=None, is_online=False, file_level=None, interminal=False, logs_directory='../logs', app_name='main')
¶
Source code in toolboxv2/utils/system/tb_logger.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | |
Styling & Console Output¶
toolboxv2.Style
¶
Source code in toolboxv2/utils/extras/Style.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 | |
toolboxv2.Spinner
¶
Enhanced Spinner with tqdm-like line rendering.
Source code in toolboxv2/utils/extras/Style.py
578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 | |
__enter__()
¶
Start the spinner.
Source code in toolboxv2/utils/extras/Style.py
644 645 646 647 648 649 | |
__exit__(exc_type, exc_value, exc_traceback)
¶
Stop the spinner.
Source code in toolboxv2/utils/extras/Style.py
651 652 653 654 655 656 657 658 | |
__init__(message='Loading...', delay=0.1, symbols=None, count_down=False, time_in_s=0)
¶
Initialize spinner with flexible configuration.
Source code in toolboxv2/utils/extras/Style.py
592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 | |
toolboxv2.remove_styles(text, infos=False)
¶
Source code in toolboxv2/utils/extras/Style.py
384 385 386 387 388 389 390 391 392 393 394 395 | |
Data Types & Structures¶
toolboxv2.AppArgs
¶
Source code in toolboxv2/utils/system/types.py
492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 | |
toolboxv2.Result
¶
Bases: Generic[T]
Source code in toolboxv2/utils/system/types.py
626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 | |
__class_getitem__(item)
¶
Enable Result[Type] syntax
Source code in toolboxv2/utils/system/types.py
643 644 645 646 647 648 649 650 651 652 653 | |
binary(data, content_type='application/octet-stream', download_name=None, info='OK', interface=ToolBoxInterfaces.remote)
classmethod
¶
Create a binary data response Result.
Source code in toolboxv2/utils/system/types.py
1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 | |
cast_to(target_type)
¶
Cast result to different type
Source code in toolboxv2/utils/system/types.py
738 739 740 741 742 743 744 745 746 747 748 | |
file(data, filename, content_type=None, info='OK', interface=ToolBoxInterfaces.remote)
classmethod
¶
Create a file download response Result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
File data as bytes or base64 string |
required | |
filename
|
Name of the file for download |
required | |
content_type
|
MIME type of the file (auto-detected if None) |
None
|
|
info
|
Response info text |
'OK'
|
|
interface
|
Target interface |
remote
|
Returns:
| Type | Description |
|---|---|
|
Result object configured for file download |
Source code in toolboxv2/utils/system/types.py
1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 | |
get_type_info()
¶
Get the generic type information
Source code in toolboxv2/utils/system/types.py
750 751 752 | |
is_typed()
¶
Check if result has type information
Source code in toolboxv2/utils/system/types.py
754 755 756 | |
json(data, info='OK', interface=ToolBoxInterfaces.remote, exec_code=0, status_code=None)
classmethod
¶
Create a JSON response Result.
Source code in toolboxv2/utils/system/types.py
970 971 972 973 974 975 976 977 978 979 980 981 982 983 | |
redirect(url, status_code=302, info='Redirect', interface=ToolBoxInterfaces.remote)
classmethod
¶
Create a redirect response.
Source code in toolboxv2/utils/system/types.py
1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 | |
sse(stream_generator, info='OK', interface=ToolBoxInterfaces.remote, cleanup_func=None)
classmethod
¶
Create an Server-Sent Events (SSE) streaming response Result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stream_generator
|
Any
|
A source yielding individual data items. This can be an async generator, sync generator, iterable, or a single item. Each item will be formatted as an SSE event. |
required |
info
|
str
|
Optional help text for the Result. |
'OK'
|
interface
|
ToolBoxInterfaces
|
Optional ToolBoxInterface to target. |
remote
|
cleanup_func
|
Callable[[], None] | Callable[[], T] | Callable[[], AsyncGenerator[T, None]] | None
|
Optional cleanup function to run when the stream ends or is cancelled. |
None
|
#http_headers
|
Optional dictionary of custom HTTP headers for the SSE response. |
required |
Returns:
| Type | Description |
|---|---|
|
A Result object configured for SSE streaming. |
Source code in toolboxv2/utils/system/types.py
929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 | |
stream(stream_generator, content_type='text/event-stream', headers=None, info='OK', interface=ToolBoxInterfaces.remote, cleanup_func=None)
classmethod
¶
Create a streaming response Result. Handles SSE and other stream types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stream_generator
|
Any
|
Any stream source (async generator, sync generator, iterable, or single item). |
required |
content_type
|
str
|
Content-Type header (default: text/event-stream for SSE). |
'text/event-stream'
|
headers
|
dict | None
|
Additional HTTP headers for the response. |
None
|
info
|
str
|
Help text for the result. |
'OK'
|
interface
|
ToolBoxInterfaces
|
Interface to send data to. |
remote
|
cleanup_func
|
Callable[[], None] | Callable[[], T] | Callable[[], AsyncGenerator[T, None]] | None
|
Optional function for cleanup. |
None
|
Returns:
| Type | Description |
|---|---|
|
A Result object configured for streaming. |
Source code in toolboxv2/utils/system/types.py
851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 | |
text(text_data, content_type='text/plain', exec_code=None, status=200, info='OK', interface=ToolBoxInterfaces.remote, headers=None)
classmethod
¶
Create a text response Result with specific content type.
Source code in toolboxv2/utils/system/types.py
985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 | |
typed_aget(key=None, default=None)
async
¶
Async get data with type validation
Source code in toolboxv2/utils/system/types.py
667 668 669 670 671 672 673 674 675 676 | |
typed_get(key=None, default=None)
¶
Get data with type validation
Source code in toolboxv2/utils/system/types.py
655 656 657 658 659 660 661 662 663 664 665 | |
typed_json(data, info='OK', interface=ToolBoxInterfaces.remote, exec_code=0, status_code=None)
classmethod
¶
Create JSON result with type information
Source code in toolboxv2/utils/system/types.py
718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 | |
typed_ok(data, data_info='', info='OK', interface=ToolBoxInterfaces.native)
classmethod
¶
Create OK result with type information
Source code in toolboxv2/utils/system/types.py
705 706 707 708 709 710 711 712 713 714 715 716 | |
toolboxv2.ApiResult
¶
Bases: BaseModel
Source code in toolboxv2/utils/system/types.py
588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 | |
toolboxv2.RequestData
¶
Main class representing the complete request data structure.
Source code in toolboxv2/utils/system/types.py
302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 | |
__getattr__(name)
¶
Delegate unknown attributes to the request object.
Source code in toolboxv2/utils/system/types.py
326 327 328 329 330 331 332 | |
from_dict(data)
classmethod
¶
Create a RequestData instance from a dictionary.
Source code in toolboxv2/utils/system/types.py
309 310 311 312 313 314 315 316 | |
to_dict()
¶
Convert the RequestData object back to a dictionary.
Source code in toolboxv2/utils/system/types.py
318 319 320 321 322 323 324 | |
Security¶
toolboxv2.Code
¶
Source code in toolboxv2/utils/security/cryp.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 | |
decrypt_asymmetric(encrypted_text_hex, private_key_str)
staticmethod
¶
Entschlüsselt einen Text mit einem gegebenen privaten Schlüssel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
encrypted_text_hex
|
str
|
Der verschlüsselte Text als Hex-String. |
required |
private_key_str
|
str
|
Der private Schlüssel als String. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Der entschlüsselte Text. |
Source code in toolboxv2/utils/security/cryp.py
336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 | |
decrypt_symmetric(encrypted_text, key, to_str=True, mute=False)
staticmethod
¶
Entschlüsselt einen Text mit einem gegebenen symmetrischen Schlüssel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
encrypted_text
|
str
|
Der zu entschlüsselnde Text. |
required |
key
|
str
|
Der symmetrische Schlüssel. |
required |
to_str
|
bool
|
default true returns str if false returns bytes |
True
|
Returns: str: Der entschlüsselte Text.
Source code in toolboxv2/utils/security/cryp.py
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | |
encrypt_asymmetric(text, public_key_str)
staticmethod
¶
Verschlüsselt einen Text mit einem gegebenen öffentlichen Schlüssel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Der zu verschlüsselnde Text. |
required |
public_key_str
|
str
|
Der öffentliche Schlüssel als String oder im pem format. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Der verschlüsselte Text. |
Source code in toolboxv2/utils/security/cryp.py
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | |
encrypt_symmetric(text, key)
staticmethod
¶
Verschlüsselt einen Text mit einem gegebenen symmetrischen Schlüssel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Der zu verschlüsselnde Text. |
required |
key
|
str
|
Der symmetrische Schlüssel. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Der verschlüsselte Text. |
Source code in toolboxv2/utils/security/cryp.py
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | |
generate_asymmetric_keys()
staticmethod
¶
Generiert ein Paar von öffentlichen und privaten Schlüsseln für die asymmetrische Verschlüsselung.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
seed
|
int
|
Ein optionaler Seed-Wert. Standardmäßig None. |
required |
Returns:
| Type | Description |
|---|---|
(str, str)
|
Ein Tupel aus öffentlichem und privatem Schlüssel. |
Source code in toolboxv2/utils/security/cryp.py
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | |
generate_random_string(length)
staticmethod
¶
Generiert eine zufällige Zeichenkette der angegebenen Länge.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
length
|
int
|
Die Länge der zu generierenden Zeichenkette. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Die generierte Zeichenkette. |
Source code in toolboxv2/utils/security/cryp.py
81 82 83 84 85 86 87 88 89 90 91 92 | |
generate_seed()
staticmethod
¶
Erzeugt eine zufällige Zahl als Seed.
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Eine zufällige Zahl. |
Source code in toolboxv2/utils/security/cryp.py
114 115 116 117 118 119 120 121 122 | |
generate_symmetric_key(as_str=True)
staticmethod
¶
Generiert einen Schlüssel für die symmetrische Verschlüsselung.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str or bytes
|
Der generierte Schlüssel. |
Source code in toolboxv2/utils/security/cryp.py
140 141 142 143 144 145 146 147 148 149 150 151 | |
load_keys_from_files(directory='keys')
staticmethod
¶
Lädt die Schlüssel aus den Dateien. Der private Schlüssel wird mit dem Device Key entschlüsselt.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
directory
|
str
|
Das Verzeichnis, aus dem die Schlüssel geladen werden sollen |
'keys'
|
Returns:
| Type | Description |
|---|---|
(str, str)
|
Ein Tupel aus öffentlichem und privatem Schlüssel |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
Wenn die Schlüsseldateien nicht gefunden werden können |
Source code in toolboxv2/utils/security/cryp.py
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | |
one_way_hash(text, salt='', pepper='')
staticmethod
¶
Erzeugt einen Hash eines gegebenen Textes mit Salt, Pepper und optional einem Seed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Der zu hashende Text. |
required |
salt
|
str
|
Der Salt-Wert. |
''
|
pepper
|
str
|
Der Pepper-Wert. |
''
|
seed
|
int
|
Ein optionaler Seed-Wert. Standardmäßig None. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Der resultierende Hash-Wert. |
Source code in toolboxv2/utils/security/cryp.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | |
pem_to_public_key(pem_key)
staticmethod
¶
Konvertiert einen PEM-kodierten öffentlichen Schlüssel in ein PublicKey-Objekt.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pem_key
|
str
|
Der PEM-kodierte öffentliche Schlüssel. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
PublicKey |
Das PublicKey-Objekt. |
Source code in toolboxv2/utils/security/cryp.py
435 436 437 438 439 440 441 442 443 444 445 446 447 | |
public_key_to_pem(public_key)
staticmethod
¶
Konvertiert ein PublicKey-Objekt in einen PEM-kodierten String.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
public_key
|
PublicKey
|
Das PublicKey-Objekt. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
Der PEM-kodierte öffentliche Schlüssel. |
Source code in toolboxv2/utils/security/cryp.py
449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 | |
save_keys_to_files(public_key, private_key, directory='keys')
staticmethod
¶
Speichert die generierten Schlüssel in separate Dateien. Der private Schlüssel wird mit dem Device Key verschlüsselt.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
public_key
|
str
|
Der öffentliche Schlüssel im PEM-Format |
required |
private_key
|
str
|
Der private Schlüssel im PEM-Format |
required |
directory
|
str
|
Das Verzeichnis, in dem die Schlüssel gespeichert werden sollen |
'keys'
|
Source code in toolboxv2/utils/security/cryp.py
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 | |
Modules & Flows¶
toolboxv2.mods
¶
Canvas
¶
Tools
¶
Bases: MainTool
Source code in toolboxv2/mods/Canvas.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | |
handle_send_canvas_action(app, request, data)
async
¶
Handles incremental, real-time actions from clients (e.g., adding an element). It persists the change to the database and then broadcasts it to all live listeners.
Source code in toolboxv2/mods/Canvas.py
523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 | |
markdown_to_svg(self, request, markdown_text='', width=400, font_family='sans-serif', font_size=14, bg_color='#ffffff', text_color='#000000')
async
¶
Converts a string of Markdown text into an SVG image. The SVG is returned as a base64 encoded data URL. This version uses a viewBox for better scalability and multi-line handling.
Source code in toolboxv2/mods/Canvas.py
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | |
save_session(app, request, data)
async
¶
Saves the entire state of a canvas session to the database. This is typically triggered by a user's explicit "Save" action.
Source code in toolboxv2/mods/Canvas.py
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | |
ChatModule
¶
get_chat_ui(app)
¶
Liefert das Haupt-HTML-UI für das Chat-Widget.
Es verwendet app.web_context(), um das notwendige tbjs CSS und JS einzubinden.
Source code in toolboxv2/mods/ChatModule.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | |
on_chat_message(app, conn_id, session, payload)
async
¶
Wird aufgerufen, wenn eine Nachricht von einem Client empfangen wird.
Source code in toolboxv2/mods/ChatModule.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | |
on_user_connect(app, conn_id, session)
async
¶
Wird vom Rust WebSocket Actor aufgerufen, wenn ein neuer Client eine Verbindung herstellt.
Source code in toolboxv2/mods/ChatModule.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | |
on_user_disconnect(app, conn_id, session=None)
async
¶
Wird aufgerufen, wenn die Verbindung eines Clients geschlossen wird.
Source code in toolboxv2/mods/ChatModule.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |
register_chat_handlers(app)
¶
Registriert die asynchronen Funktionen als Handler für spezifische WebSocket-Ereignisse.
Der Funktionsname (register_chat_handlers) ist beliebig. Der Decorator ist entscheidend.
Returns:
| Type | Description |
|---|---|
dict
|
Ein Dictionary, das Ereignisnamen auf ihre Handler-Funktionen abbildet. |
Source code in toolboxv2/mods/ChatModule.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 | |
CloudM
¶
check_multiple_processes(pids)
¶
Checks the status of multiple processes in a single system call. Returns a dictionary mapping PIDs to their status (GREEN_CIRCLE, RED_CIRCLE, or YELLOW_CIRCLE).
Source code in toolboxv2/mods/CloudM/mini.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | |
get_service_pids(info_dir)
¶
Extracts service names and PIDs from pid files.
Source code in toolboxv2/mods/CloudM/mini.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |
get_service_status(dir)
¶
Displays the status of all services.
Source code in toolboxv2/mods/CloudM/mini.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | |
AuthManager
¶
delete_user(app, username)
¶
Deletes a user and all their data.
Source code in toolboxv2/mods/CloudM/AuthManager.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | |
list_users(app)
¶
Lists all registered users.
Source code in toolboxv2/mods/CloudM/AuthManager.py
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | |
LogInSystem
¶
cli_logout(app=None)
async
¶
Enhanced logout with modern visual feedback
Source code in toolboxv2/mods/CloudM/LogInSystem.py
599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 | |
cli_web_login(app=None, force_remote=False, force_local=False)
async
¶
Enhanced CLI web login with remote/local options and modern visual feedback
Source code in toolboxv2/mods/CloudM/LogInSystem.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
open_check_cli_auth(session_id, app=None)
async
¶
Check if CLI authentication is complete
Source code in toolboxv2/mods/CloudM/LogInSystem.py
539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 | |
open_complete_cli_auth(session_id, jwt_token, username, app=None)
async
¶
Complete CLI authentication process - No auth required as this IS the auth process
Source code in toolboxv2/mods/CloudM/LogInSystem.py
563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 | |
open_web_login_web(app, request, session_id=None, return_to=None, log_in_for='CLI')
async
¶
Handle web login flow for CLI and Browser
Source code in toolboxv2/mods/CloudM/LogInSystem.py
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | |
print_menu_option(number, text, selected=False)
¶
Print a menu option
Source code in toolboxv2/mods/CloudM/LogInSystem.py
28 29 30 31 32 33 | |
ModManager
¶
CloudM - Advanced Module Manager Production-ready module management system with multi-platform support Version: 0.1.0
ConfigVersion
¶
Bases: Enum
Configuration file versions
Source code in toolboxv2/mods/CloudM/ModManager.py
53 54 55 56 | |
MenuCategory
dataclass
¶
Menu category.
Source code in toolboxv2/mods/CloudM/ModManager.py
1360 1361 1362 1363 1364 1365 | |
MenuItem
dataclass
¶
Menu item with action.
Source code in toolboxv2/mods/CloudM/ModManager.py
1349 1350 1351 1352 1353 1354 1355 1356 1357 | |
ModernMenuManager
¶
Modern menu manager with arrow key navigation.
Source code in toolboxv2/mods/CloudM/ModManager.py
1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 | |
add_category(category)
¶
Add a menu category.
Source code in toolboxv2/mods/CloudM/ModManager.py
1449 1450 1451 1452 | |
get_menu_text()
¶
Generate formatted menu text.
Source code in toolboxv2/mods/CloudM/ModManager.py
1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 | |
get_selected_item()
¶
Get currently selected menu item.
Source code in toolboxv2/mods/CloudM/ModManager.py
1525 1526 1527 1528 1529 | |
move_down()
¶
Move selection down.
Source code in toolboxv2/mods/CloudM/ModManager.py
1520 1521 1522 1523 | |
move_up()
¶
Move selection up.
Source code in toolboxv2/mods/CloudM/ModManager.py
1515 1516 1517 1518 | |
run()
async
¶
Run the menu manager.
Source code in toolboxv2/mods/CloudM/ModManager.py
1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 | |
ModuleType
¶
Bases: Enum
Module types for different installation strategies
Source code in toolboxv2/mods/CloudM/ModManager.py
46 47 48 49 50 | |
Platform
¶
Bases: Enum
Supported platform types for module installation
Source code in toolboxv2/mods/CloudM/ModManager.py
36 37 38 39 40 41 42 43 | |
build_all_mods(app, base='mods', upload=True)
async
¶
Builds installer packages for all modules.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
Optional[App]
|
Application instance |
required |
base
|
str
|
Base directory containing modules |
'mods'
|
upload
|
bool
|
Whether to upload packages after building |
True
|
Returns:
| Type | Description |
|---|---|
Result
|
Result with build summary |
Source code in toolboxv2/mods/CloudM/ModManager.py
1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 | |
create_and_pack_module(path, module_name='', version='-.-.-', additional_dirs=None, yaml_data=None, platform_filter=None)
¶
Creates and packs a module into a ZIP file with platform-specific support.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Path to module directory or file |
required |
module_name
|
str
|
Name of the module |
''
|
version
|
str
|
Module version |
'-.-.-'
|
additional_dirs
|
Optional[Dict]
|
Additional directories to include |
None
|
yaml_data
|
Optional[Dict]
|
Configuration data override |
None
|
platform_filter
|
Optional[Platform]
|
Optional platform filter for packaging |
None
|
Returns:
| Type | Description |
|---|---|
Optional[str]
|
Path to created ZIP file or None on failure |
Source code in toolboxv2/mods/CloudM/ModManager.py
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 | |
create_module_from_blueprint(app=None, module_name='', module_type='basic', description='', version='0.0.1', location='./mods', author='', create_config=True, external=False)
async
¶
Creates a new module from blueprint template.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
Optional[App]
|
Application instance |
None
|
module_name
|
str
|
Name of the new module |
''
|
module_type
|
str
|
Type of module (basic, async_service, workflow, etc.) |
'basic'
|
description
|
str
|
Module description |
''
|
version
|
str
|
Initial version |
'0.0.1'
|
location
|
str
|
Where to create the module |
'./mods'
|
author
|
str
|
Module author |
''
|
create_config
|
bool
|
Whether to create tbConfig.yaml |
True
|
external
|
bool
|
If True, create external to toolbox structure |
False
|
Returns:
| Type | Description |
|---|---|
Result
|
Result with creation status |
Source code in toolboxv2/mods/CloudM/ModManager.py
3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 | |
create_tb_config_single(module_name, version, file_path, description='', author='', specification=None, dependencies=None, platforms=None, metadata=None)
¶
Creates configuration for single-file modules.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
module_name
|
str
|
Name of the module |
required |
version
|
str
|
Module version |
required |
file_path
|
str
|
Path to the single file |
required |
description
|
str
|
Module description |
''
|
author
|
str
|
Module author |
''
|
specification
|
Optional[Dict]
|
File specifications (exports, functions, etc.) |
None
|
dependencies
|
Optional[List]
|
List of dependencies |
None
|
platforms
|
Optional[List[Platform]]
|
List of supported platforms |
None
|
metadata
|
Optional[Dict]
|
Additional metadata |
None
|
Returns:
| Type | Description |
|---|---|
Dict
|
Configuration dictionary for single file module |
Source code in toolboxv2/mods/CloudM/ModManager.py
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 | |
create_tb_config_v2(module_name, version, module_type=ModuleType.PACKAGE, description='', author='', license='MIT', homepage='', platforms=None, metadata=None)
¶
Creates a v2 tbConfig with platform-specific file management.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
module_name
|
str
|
Name of the module |
required |
version
|
str
|
Module version |
required |
module_type
|
ModuleType
|
Type of module (package/single/hybrid) |
PACKAGE
|
description
|
str
|
Module description |
''
|
author
|
str
|
Module author |
''
|
license
|
str
|
Module license |
'MIT'
|
homepage
|
str
|
Module homepage/repository |
''
|
platforms
|
Optional[Dict]
|
Platform-specific file configurations |
None
|
metadata
|
Optional[Dict]
|
Additional metadata |
None
|
Returns:
| Type | Description |
|---|---|
Dict
|
Configuration dictionary |
Source code in toolboxv2/mods/CloudM/ModManager.py
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | |
download_files(urls, directory, desc, print_func, filename=None)
¶
Downloads files from URLs with progress indication.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
urls
|
List[str]
|
List of URLs to download |
required |
directory
|
str
|
Target directory |
required |
desc
|
str
|
Progress bar description |
required |
print_func
|
callable
|
Function for printing messages |
required |
filename
|
Optional[str]
|
Optional filename (uses basename if None) |
None
|
Returns:
| Type | Description |
|---|---|
str
|
Path to last downloaded file |
Source code in toolboxv2/mods/CloudM/ModManager.py
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
download_mod(app, module_name, platform=None)
async
¶
Downloads a module ZIP file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
App
|
Application instance |
required |
module_name
|
str
|
Name of module to download |
required |
platform
|
Optional[str]
|
Optional platform filter |
None
|
Returns:
| Type | Description |
|---|---|
Result
|
Binary result with ZIP file |
Source code in toolboxv2/mods/CloudM/ModManager.py
864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 | |
format_status(status, message)
¶
Format status message with icon.
Source code in toolboxv2/mods/CloudM/ModManager.py
1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 | |
generate_configs_for_existing_mods(app=None, root_dir='./mods', backup=True, interactive=True, overwrite=False)
async
¶
Generates tbConfig.yaml files for all existing modules in the mods directory.
Supports: - Package modules (directories) -> tbConfig.yaml (v2) - Single file modules (.py files) -> {module_name}.yaml (single)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
Optional[App]
|
Application instance |
None
|
root_dir
|
str
|
Root directory containing modules |
'./mods'
|
backup
|
bool
|
Create backups of existing configs |
True
|
interactive
|
bool
|
Ask for confirmation before each operation |
True
|
overwrite
|
bool
|
Overwrite existing configs without asking |
False
|
Returns:
| Type | Description |
|---|---|
Result
|
Result with generation summary |
Source code in toolboxv2/mods/CloudM/ModManager.py
2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 | |
generate_single_module_config(app=None, module_name='', force=False)
async
¶
Generates config for a single specific module.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
Optional[App]
|
Application instance |
None
|
module_name
|
str
|
Name of module to generate config for |
''
|
force
|
bool
|
Force overwrite without asking |
False
|
Returns:
| Type | Description |
|---|---|
Result
|
Result with generation status |
Source code in toolboxv2/mods/CloudM/ModManager.py
2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 | |
get_mod_info(app, module_name)
async
¶
Gets detailed information about a module.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
App
|
Application instance |
required |
module_name
|
str
|
Name of module |
required |
Returns:
| Type | Description |
|---|---|
Result
|
Result with module information |
Source code in toolboxv2/mods/CloudM/ModManager.py
932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 | |
get_mod_version(app, module_name)
async
¶
Gets the latest version of a module.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
App
|
Application instance |
required |
module_name
|
str
|
Name of module |
required |
Returns:
| Type | Description |
|---|---|
Result
|
Result with version string |
Source code in toolboxv2/mods/CloudM/ModManager.py
905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 | |
get_platform_files(config, platform)
¶
Extracts file list for specific platform from config.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
Dict
|
Module configuration dictionary |
required |
platform
|
Platform
|
Target platform |
required |
Returns:
| Type | Description |
|---|---|
List[str]
|
List of files for the platform |
Source code in toolboxv2/mods/CloudM/ModManager.py
368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 | |
increment_version(version_str, max_value=99)
¶
Increments a version number in the format "vX.Y.Z".
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
version_str
|
str
|
Current version number (e.g., "v0.0.1") |
required |
max_value
|
int
|
Maximum number per position (default: 99) |
99
|
Returns:
| Type | Description |
|---|---|
str
|
Incremented version number |
Raises:
| Type | Description |
|---|---|
ValueError
|
If version format is invalid |
Source code in toolboxv2/mods/CloudM/ModManager.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | |
install_dependencies(yaml_file, auto=False)
¶
Installs dependencies from tbConfig.yaml.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
yaml_file
|
str
|
Path to configuration file |
required |
auto
|
bool
|
Automatically install without confirmation |
False
|
Returns:
| Type | Description |
|---|---|
bool
|
True if successful, False otherwise |
Source code in toolboxv2/mods/CloudM/ModManager.py
665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 | |
install_from_zip(app, zip_name, no_dep=True, auto_dep=False, target_platform=None)
¶
Installs a module from ZIP file with dependency management.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
App
|
Application instance |
required |
zip_name
|
str
|
Name of ZIP file |
required |
no_dep
|
bool
|
Skip dependency installation |
True
|
auto_dep
|
bool
|
Automatically install dependencies |
False
|
target_platform
|
Optional[Platform]
|
Optional platform filter |
None
|
Returns:
| Type | Description |
|---|---|
bool
|
True if successful, False otherwise |
Source code in toolboxv2/mods/CloudM/ModManager.py
748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 | |
installer(app, module_name, build_state=True, platform=None)
async
¶
Installs or updates a module from the server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
Optional[App]
|
Application instance |
required |
module_name
|
str
|
Name of module to install |
required |
build_state
|
bool
|
Whether to rebuild state after installation |
True
|
platform
|
Optional[Platform]
|
Optional platform filter for installation |
None
|
Returns:
| Type | Description |
|---|---|
Result
|
Result with installation status |
Source code in toolboxv2/mods/CloudM/ModManager.py
1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 | |
interactive_manager(app=None)
async
¶
Modern interactive CLI manager for module operations.
Features: - Arrow key navigation (↑↓ or w/s) - Modern, minimalistic UI - All original functionality preserved - Better visual feedback - Elegant dialogs and prompts
Source code in toolboxv2/mods/CloudM/ModManager.py
2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 | |
list_module_templates(app=None)
¶
Lists all available module templates.
Returns:
| Type | Description |
|---|---|
Result
|
Result with template information |
Source code in toolboxv2/mods/CloudM/ModManager.py
3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 | |
list_modules(app=None)
¶
Lists all available modules.
Returns:
| Type | Description |
|---|---|
Result
|
Result with module list |
Source code in toolboxv2/mods/CloudM/ModManager.py
797 798 799 800 801 802 803 804 805 806 807 808 809 | |
load_and_validate_config(config_path)
¶
Loads and validates a configuration file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config_path
|
Path
|
Path to configuration file |
required |
Returns:
| Type | Description |
|---|---|
Tuple[Optional[Dict], List[str]]
|
Tuple of (config_dict or None, list_of_errors) |
Source code in toolboxv2/mods/CloudM/ModManager.py
333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 | |
make_installer(app, module_name, base='./mods', upload=None, platform=None)
async
¶
Creates an installer package for a module.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
Optional[App]
|
Application instance |
required |
module_name
|
str
|
Name of module to package |
required |
base
|
str
|
Base directory containing modules |
'./mods'
|
upload
|
Optional[bool]
|
Whether to upload after creation |
None
|
platform
|
Optional[Platform]
|
Optional platform filter |
None
|
Returns:
| Type | Description |
|---|---|
Result
|
Result with package path or upload status |
Source code in toolboxv2/mods/CloudM/ModManager.py
970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 | |
mod_manager_ui(app)
¶
Serves the module manager web interface.
Returns:
| Type | Description |
|---|---|
Result
|
HTML result with UI |
Source code in toolboxv2/mods/CloudM/ModManager.py
2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 | |
run_command(command, cwd=None)
¶
Executes a command and returns output.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
command
|
List[str]
|
Command and arguments as list |
required |
cwd
|
Optional[str]
|
Working directory for command execution |
None
|
Returns:
| Type | Description |
|---|---|
str
|
Command stdout output |
Raises:
| Type | Description |
|---|---|
CalledProcessError
|
If command fails |
Source code in toolboxv2/mods/CloudM/ModManager.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | |
show_choice(title, text, choices)
async
¶
Show radio list dialog.
Source code in toolboxv2/mods/CloudM/ModManager.py
1420 1421 1422 1423 1424 1425 1426 1427 1428 | |
show_confirm(title, text)
async
¶
Show confirmation dialog.
Source code in toolboxv2/mods/CloudM/ModManager.py
1399 1400 1401 1402 1403 1404 1405 1406 | |
show_input(title, label, default='')
async
¶
Show input dialog.
Source code in toolboxv2/mods/CloudM/ModManager.py
1409 1410 1411 1412 1413 1414 1415 1416 1417 | |
show_message(title, text, style='info')
async
¶
Show a message dialog.
Source code in toolboxv2/mods/CloudM/ModManager.py
1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 | |
show_progress(title, message)
async
¶
Show a simple progress message.
Source code in toolboxv2/mods/CloudM/ModManager.py
1431 1432 1433 1434 | |
uninstall_dependencies(yaml_file)
¶
Uninstalls dependencies from tbConfig.yaml.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
yaml_file
|
str
|
Path to configuration file |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if successful, False otherwise |
Source code in toolboxv2/mods/CloudM/ModManager.py
713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 | |
uninstall_module(path, module_name='', version='-.-.-', additional_dirs=None, yaml_data=None)
¶
Uninstalls a module by removing its directory and ZIP file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Base path containing module |
required |
module_name
|
str
|
Name of module to uninstall |
''
|
version
|
str
|
Module version |
'-.-.-'
|
additional_dirs
|
Optional[Dict]
|
Additional directories to remove |
None
|
yaml_data
|
Optional[Dict]
|
Configuration data |
None
|
Returns:
| Type | Description |
|---|---|
bool
|
True if successful, False otherwise |
Source code in toolboxv2/mods/CloudM/ModManager.py
609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 | |
uninstaller(app, module_name)
¶
Uninstalls a module.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
Optional[App]
|
Application instance |
required |
module_name
|
str
|
Name of module to uninstall |
required |
Returns:
| Type | Description |
|---|---|
Result
|
Result with uninstallation status |
Source code in toolboxv2/mods/CloudM/ModManager.py
1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 | |
unpack_and_move_module(zip_path, base_path='./mods', module_name='', target_platform=None)
¶
Unpacks a ZIP file and moves contents with platform filtering.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
zip_path
|
str
|
Path to ZIP file |
required |
base_path
|
str
|
Base installation path |
'./mods'
|
module_name
|
str
|
Module name (extracted from ZIP if not provided) |
''
|
target_platform
|
Optional[Platform]
|
Optional platform filter for installation |
None
|
Returns:
| Type | Description |
|---|---|
Optional[str]
|
Name of installed module or None on failure |
Source code in toolboxv2/mods/CloudM/ModManager.py
510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 | |
update_all_mods(app)
async
¶
Updates all installed modules.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
Optional[App]
|
Application instance |
required |
Returns:
| Type | Description |
|---|---|
Result
|
Result with update summary |
Source code in toolboxv2/mods/CloudM/ModManager.py
1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 | |
upload(app, module_name)
async
¶
Uploads an existing module package to the server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
Optional[App]
|
Application instance |
required |
module_name
|
str
|
Name of module to upload |
required |
Returns:
| Type | Description |
|---|---|
Result
|
Result with upload status |
Source code in toolboxv2/mods/CloudM/ModManager.py
1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 | |
upload_mod(app, request, form_data=None)
async
¶
Uploads a module ZIP file to the server.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app
|
App
|
Application instance |
required |
request
|
RequestData
|
Request data |
required |
form_data
|
Optional[Dict[str, Any]]
|
Form data containing file |
None
|
Returns:
| Type | Description |
|---|---|
Result
|
Result with upload status |
Source code in toolboxv2/mods/CloudM/ModManager.py
812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 | |
validate_config(config, schema)
¶
Validates configuration against schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
Dict
|
Configuration dictionary to validate |
required |
schema
|
Dict
|
Schema dictionary with expected types |
required |
Returns:
| Type | Description |
|---|---|
Tuple[bool, List[str]]
|
Tuple of (is_valid, list_of_errors) |
Source code in toolboxv2/mods/CloudM/ModManager.py
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | |
ModManager_tests
¶
TestModManager
¶
Bases: TestCase
Source code in toolboxv2/mods/CloudM/ModManager_tests.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | |
setUp()
¶
Set up a temporary environment for each test.
Source code in toolboxv2/mods/CloudM/ModManager_tests.py
58 59 60 61 62 63 64 65 66 67 68 | |
tearDown()
¶
Clean up the temporary environment after each test.
Source code in toolboxv2/mods/CloudM/ModManager_tests.py
70 71 72 73 | |
test_create_pack_unpack_cycle()
¶
Tests the full cycle of creating, packing, and unpacking a module.
Source code in toolboxv2/mods/CloudM/ModManager_tests.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | |
test_increment_version()
¶
Tests the version increment logic.
Source code in toolboxv2/mods/CloudM/ModManager_tests.py
47 48 49 50 51 52 53 54 55 56 | |
test_install_from_zip()
¶
Tests the install_from_zip helper function.
Source code in toolboxv2/mods/CloudM/ModManager_tests.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | |
run_mod_manager_tests(app)
¶
This function will be automatically discovered and run by the test runner. It uses the standard unittest framework to run tests.
Source code in toolboxv2/mods/CloudM/ModManager_tests.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | |
UserAccountManager
¶
get_current_user_from_request_api_wrapper(app, request)
async
¶
API callable version of get_current_user_from_request for tbjs/admin panel
Source code in toolboxv2/mods/CloudM/UserAccountManager.py
150 151 152 153 154 155 156 157 158 159 160 161 | |
UserDashboard
¶
close_cli_session(app, request, cli_session_id)
async
¶
Close a specific CLI session
Source code in toolboxv2/mods/CloudM/UserDashboard.py
1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 | |
configure_jwt_settings(app=None, ttl_hours=24, allowed_mods=None)
¶
Configure JWT settings for CLI sessions
Source code in toolboxv2/mods/CloudM/UserDashboard.py
1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 | |
generate_cli_jwt(app=None, username=None, custom_ttl=None)
¶
Generate JWT token for CLI access
Source code in toolboxv2/mods/CloudM/UserDashboard.py
1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 | |
get_jwt_dashboard(app=None)
¶
Get JWT management dashboard data
Source code in toolboxv2/mods/CloudM/UserDashboard.py
1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 | |
get_my_active_instances_with_cli(app, request)
async
¶
Get active instances including CLI sessions
Source code in toolboxv2/mods/CloudM/UserDashboard.py
1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 | |
validate_cli_jwt(app=None, token=None)
¶
Validate CLI JWT token
Source code in toolboxv2/mods/CloudM/UserDashboard.py
1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 | |
UserInstances
¶
cleanup_expired_cli_sessions(max_age_hours=24)
¶
Clean up expired CLI sessions
Source code in toolboxv2/mods/CloudM/UserInstances.py
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 | |
close_cli_session(cli_session_id)
¶
Close a CLI session
Source code in toolboxv2/mods/CloudM/UserInstances.py
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | |
get_all_active_cli_sessions()
¶
Get all active CLI sessions
Source code in toolboxv2/mods/CloudM/UserInstances.py
321 322 323 324 | |
get_instance_overview(si_id=None)
¶
Get comprehensive overview of user instances and CLI sessions
Source code in toolboxv2/mods/CloudM/UserInstances.py
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 | |
get_user_cli_sessions(uid)
¶
Get all CLI sessions for a user
Source code in toolboxv2/mods/CloudM/UserInstances.py
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 | |
get_user_instance_with_cli_sessions(uid, hydrate=True)
¶
Enhanced get_user_instance that includes CLI sessions
Source code in toolboxv2/mods/CloudM/UserInstances.py
345 346 347 348 349 350 351 352 353 354 355 356 357 | |
register_cli_session(uid, jwt_token, session_info=None)
¶
Register a new CLI session
Source code in toolboxv2/mods/CloudM/UserInstances.py
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 | |
update_cli_session_activity(cli_session_id)
¶
Update last activity timestamp for CLI session
Source code in toolboxv2/mods/CloudM/UserInstances.py
261 262 263 264 265 266 267 268 269 270 271 272 273 | |
email_services
¶
send_email_verification_email(app, user_email, username, verification_url)
¶
Sends an email verification link to the user.
Source code in toolboxv2/mods/CloudM/email_services.py
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | |
send_magic_link_email(app, user_email, magic_link_url, username=None)
¶
Sends a magic link email for login.
Source code in toolboxv2/mods/CloudM/email_services.py
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | |
send_signup_invitation_email(app, invited_user_email, invited_username, inviter_username=None)
¶
Generates an invitation link and sends it via email.
Source code in toolboxv2/mods/CloudM/email_services.py
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | |
send_waiting_list_confirmation_email(app, user_email)
¶
Sends a confirmation email for joining the waiting list.
Source code in toolboxv2/mods/CloudM/email_services.py
256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | |
send_welcome_email(app, user_email, username, welcome_action_url=None)
¶
Sends a welcome email to a new user.
Source code in toolboxv2/mods/CloudM/email_services.py
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | |
extras
¶
cli_logout(app=None)
async
¶
CLI logout - imports from LogInSystem
Source code in toolboxv2/mods/CloudM/extras.py
369 370 371 372 373 | |
cli_web_login(app=None, force_remote=False, force_local=False)
async
¶
Enhanced CLI web login - imports from LogInSystem
Source code in toolboxv2/mods/CloudM/extras.py
363 364 365 366 367 | |
mini
¶
check_multiple_processes(pids)
¶
Checks the status of multiple processes in a single system call. Returns a dictionary mapping PIDs to their status (GREEN_CIRCLE, RED_CIRCLE, or YELLOW_CIRCLE).
Source code in toolboxv2/mods/CloudM/mini.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | |
get_service_pids(info_dir)
¶
Extracts service names and PIDs from pid files.
Source code in toolboxv2/mods/CloudM/mini.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |
get_service_status(dir)
¶
Displays the status of all services.
Source code in toolboxv2/mods/CloudM/mini.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | |
module
¶
hash_password(password)
¶
Hash a password for storing.
Source code in toolboxv2/mods/CloudM/module.py
109 110 111 112 113 114 115 | |
verify_password(stored_password, provided_password)
¶
Verify a stored password against one provided by user
Source code in toolboxv2/mods/CloudM/module.py
119 120 121 122 123 124 125 126 | |
CodeVerification
¶
VerificationSystem
¶
Source code in toolboxv2/mods/CodeVerification.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | |
__init__(tools_db, scope='main')
¶
Initialize VerificationSystem with DB Tools integration
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tools_db
|
Tools
|
Database tools from toolboxv2.mods.DB |
required |
scope
|
str
|
Scope for templates and codes. Defaults to "main". |
'main'
|
Source code in toolboxv2/mods/CodeVerification.py
27 28 29 30 31 32 33 34 35 36 37 38 | |
add_config_template(template)
¶
Add a new configuration template to the database
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
template
|
ConfigTemplate
|
The configuration template |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Unique identifier of the template |
Source code in toolboxv2/mods/CodeVerification.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | |
generate_code(template_id)
¶
Generate a code based on the configuration template
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
template_id
|
str
|
ID of the configuration template |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Generated verification code |
Source code in toolboxv2/mods/CodeVerification.py
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | |
reset_scope_templates()
¶
Ensure a templates dictionary exists for the current scope in the database
Source code in toolboxv2/mods/CodeVerification.py
43 44 45 46 47 48 49 | |
validate_code(code)
¶
Validate a code and return template information
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
code
|
str
|
Code to validate |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any] | None
|
Optional[Dict[str, Any]]: Template information for valid code, else None |
Source code in toolboxv2/mods/CodeVerification.py
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | |
DB
¶
blob_instance
¶
BlobDB
¶
A persistent, encrypted dictionary-like database that uses the BlobStorage system as its backend, making it networked and fault-tolerant.
This implementation uses multiple BlobFiles instead of a single virtual file. Keys are structured like USER::XYZ::: or MANAGER::SPACE::DATA::XYZ and are converted to file paths by replacing :: with /.
Source code in toolboxv2/mods/DB/blob_instance.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | |
exit()
¶
Saves the current state of the database back to the blob storage. Each key is saved to its own blob file based on the key structure.
Source code in toolboxv2/mods/DB/blob_instance.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | |
initialize(db_path, key, storage_client)
¶
Initializes the database from a location within the blob storage.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
db_path
|
str
|
The base path within the blob storage, e.g., "my_database_blob". |
required |
key
|
str
|
The encryption key for the database content. |
required |
storage_client
|
BlobStorage
|
An initialized BlobStorage client instance. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Result |
Result
|
An OK result if successful. |
Source code in toolboxv2/mods/DB/blob_instance.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | |
local_instance
¶
load_from_json(filename)
¶
Lädt Daten aus einer JSON-Datei.
:param filename: Der Dateiname oder Pfad der zu ladenden Datei. :return: Die geladenen Daten.
Source code in toolboxv2/mods/DB/local_instance.py
137 138 139 140 141 142 143 144 145 146 147 148 | |
save_to_json(data, filename)
¶
Speichert die übergebenen Daten in einer JSON-Datei.
:param data: Die zu speichernden Daten. :param filename: Der Dateiname oder Pfad, in dem die Daten gespeichert werden sollen.
Source code in toolboxv2/mods/DB/local_instance.py
123 124 125 126 127 128 129 130 131 132 133 134 | |
reddis_instance
¶
sync_redis_databases(source_url, target_url)
¶
Synchronize keys from the source Redis database to the target Redis database. This function scans all keys in the source DB and uses DUMP/RESTORE to replicate data to the target.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source_url
|
str
|
The Redis URL of the source database. |
required |
target_url
|
str
|
The Redis URL of the target database. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
The number of keys successfully synchronized. |
Source code in toolboxv2/mods/DB/reddis_instance.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | |
tb_adapter
¶
DB
¶
Bases: ABC
Source code in toolboxv2/mods/DB/tb_adapter.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | |
append_on_set(query, value)
abstractmethod
¶
append set data
Source code in toolboxv2/mods/DB/tb_adapter.py
64 65 66 | |
delete(query, matching=False)
abstractmethod
¶
delete data
Source code in toolboxv2/mods/DB/tb_adapter.py
68 69 70 | |
exit()
abstractmethod
¶
Close DB connection and optional save data
Source code in toolboxv2/mods/DB/tb_adapter.py
76 77 78 | |
get(query)
abstractmethod
¶
get data
Source code in toolboxv2/mods/DB/tb_adapter.py
56 57 58 | |
if_exist(query)
abstractmethod
¶
return True if query exists
Source code in toolboxv2/mods/DB/tb_adapter.py
72 73 74 | |
set(query, value)
abstractmethod
¶
set data
Source code in toolboxv2/mods/DB/tb_adapter.py
60 61 62 | |
ui
¶
api_change_mode(self, request)
async
¶
Changes the database mode from a JSON POST body.
Source code in toolboxv2/mods/DB/ui.py
266 267 268 269 270 271 272 273 | |
api_delete_key(self, request)
async
¶
Deletes a key from a JSON POST body.
Source code in toolboxv2/mods/DB/ui.py
254 255 256 257 258 259 260 261 262 263 | |
api_get_all_keys(self, request)
async
¶
Returns a list of all keys in the database.
Source code in toolboxv2/mods/DB/ui.py
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | |
api_get_blob_status(self, request)
async
¶
Returns blob storage status - admin/trusted only.
Source code in toolboxv2/mods/DB/ui.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | |
api_get_cluster_status(self, request)
async
¶
Get DB cluster status - admin/trusted only.
Source code in toolboxv2/mods/DB/ui.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |
api_get_status(self, request)
async
¶
Returns the current status of the DB manager.
Source code in toolboxv2/mods/DB/ui.py
195 196 197 198 | |
api_get_value(self, request, key)
async
¶
Gets a value for a key and returns it as JSON-friendly text.
Source code in toolboxv2/mods/DB/ui.py
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 | |
api_list_blob_files(self, request)
async
¶
List blob files - admin/trusted only.
Source code in toolboxv2/mods/DB/ui.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | |
api_manage_cluster(self, request)
async
¶
Manage cluster instances - admin/trusted only.
Source code in toolboxv2/mods/DB/ui.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | |
api_set_value(self, request)
async
¶
Sets a key-value pair from a JSON POST body.
Source code in toolboxv2/mods/DB/ui.py
241 242 243 244 245 246 247 248 249 250 251 | |
db_manager_ui(**kwargs)
¶
Serves the refactored, JSON-focused UI for the DB Manager.
Source code in toolboxv2/mods/DB/ui.py
278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 | |
EventManager
¶
module
¶
EventManagerClass
¶
Source code in toolboxv2/mods/EventManager/module.py
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 | |
trigger_event(event_id)
async
¶
Exec source based on
source_types F -> call directly R -> use get_app(str(event_id)).run_any(args, *kwargs) S -> evaluate string scope instance -> _trigger_local local -> if you ar proxy app run the event through get_app(str(event_id)).run_any(TBEF.EventManager._trigger_local, args=args, kwargs=kwargs, get_result=True) local_network -> use proxy0 app to communicate withe Daemon0 then local global_network -> exec_in event_id threaded
Source code in toolboxv2/mods/EventManager/module.py
631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | |
Rout
dataclass
¶
Source code in toolboxv2/mods/EventManager/module.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | |
close()
¶
Close
Source code in toolboxv2/mods/EventManager/module.py
165 166 | |
FileWidget
¶
FileUploadHandler
¶
Source code in toolboxv2/mods/FileWidget.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | |
save_file(chunk_info, storage)
¶
Speichert die Datei oder Chunk. Chunks werden lokal gespeichert, dann zu BlobStorage gemerged.
Source code in toolboxv2/mods/FileWidget.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | |
access_shared_file(self, request, share_id, filename=None, row=None)
async
¶
Accesses a shared file via its share_id. The URL for this would be like /api/FileWidget/shared/{share_id_value} The 'share_id: str' in signature implies ToolBoxV2 extracts it from path.
Source code in toolboxv2/mods/FileWidget.py
971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 | |
get_main_ui(self)
async
¶
Serves the main HTML UI for the FileWidget.
Source code in toolboxv2/mods/FileWidget.py
598 599 600 601 602 | |
handle_upload(self, request, form_data=None)
async
¶
Handles file uploads. Expects chunked data via form_data kwarg from Rust server. 'form_data' structure (from Rust's parsing of multipart) after client sends FormData with fields: 'file' (the blob), 'fileName', 'chunkIndex', 'totalChunks'.
Expected form_data in this Python function:
{
"file": { // This 'file' key is the NAME of the form field that held the file blob
"filename": "original_file_name_for_this_chunk.txt", // from Content-Disposition of the 'file' field part
"content_type": "mime/type_of_chunk",
"content_base64": "BASE64_ENCODED_CHUNK_CONTENT"
},
"fileName": "overall_final_filename.txt", // From a separate form field named 'fileName'
"chunkIndex": "0", // From a separate form field named 'chunkIndex'
"totalChunks": "5" // From a separate form field named 'totalChunks'
}
Source code in toolboxv2/mods/FileWidget.py
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 | |
P2PRPCClient
¶
P2PRPCClient
¶
Source code in toolboxv2/mods/P2PRPCClient.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | |
call(module, function, *args, **kwargs)
async
¶
Makes a remote procedure call.
Source code in toolboxv2/mods/P2PRPCClient.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | |
close()
async
¶
Closes the connection.
Source code in toolboxv2/mods/P2PRPCClient.py
133 134 135 136 137 138 | |
connect()
async
¶
Connects to the local tcm instance and performs key exchange.
Source code in toolboxv2/mods/P2PRPCClient.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | |
listen_for_responses()
async
¶
Listens for incoming responses, decrypts them, and resolves the corresponding future.
Source code in toolboxv2/mods/P2PRPCClient.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | |
test_rpc_client(app, host='127.0.0.1', port=8000, tb_r_key=None)
async
¶
An example of how to use the P2P RPC Client.
Source code in toolboxv2/mods/P2PRPCClient.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | |
P2PRPCServer
¶
P2PRPCServer
¶
Source code in toolboxv2/mods/P2PRPCServer.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | |
format_error(call_id, code, message, details=None)
¶
Helper to create a JSON-RPC error response object.
Source code in toolboxv2/mods/P2PRPCServer.py
137 138 139 140 141 142 143 144 145 146 147 148 | |
handle_client(reader, writer)
async
¶
Callback to handle a single client connection from a tcm instance.
Source code in toolboxv2/mods/P2PRPCServer.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | |
is_function_allowed(module, function, client_identification)
¶
Checks if a function is allowed for a given client identification.
Source code in toolboxv2/mods/P2PRPCServer.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |
process_rpc(msg_data, session_key)
async
¶
Processes a single RPC request and returns a response dictionary.
Source code in toolboxv2/mods/P2PRPCServer.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | |
start()
async
¶
Starts the TCP server.
Source code in toolboxv2/mods/P2PRPCServer.py
150 151 152 153 154 155 156 157 158 | |
stop()
¶
Stops the TCP server.
Source code in toolboxv2/mods/P2PRPCServer.py
160 161 162 163 164 | |
start_rpc_server(app, host='127.0.0.1', port=8888, tb_r_key=None, function_access_config=None)
async
¶
Starts the P2P RPC server.
Source code in toolboxv2/mods/P2PRPCServer.py
166 167 168 169 170 171 172 173 174 175 176 177 178 | |
POA
¶
module
¶
ActionManagerEnhanced
¶
Source code in toolboxv2/mods/POA/module.py
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 | |
SchedulerManager
¶
SchedulerManagerClass
¶
Source code in toolboxv2/mods/SchedulerManager.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 | |
job_wrapper(job_name, job_function)
¶
Wrap a job function to track success and errors.
Source code in toolboxv2/mods/SchedulerManager.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | |
register_job(job_id, second=-1, func=None, job=None, time_passer=None, object_name=None, receive_job=False, save=False, max_live=False, serializer=serializer_default, args=None, kwargs=None)
¶
Parameters¶
job_id : str
id for the job for management
second : int
The time interval in seconds between each call of the job.
func : Callable or str
The function to be executed as the job.
job : schedule.Job
An existing job object from the schedule library.
time_passer : schedule.Job
A job without a function, used to specify the time interval.
object_name : str
The name of the object containing in the 'func' var to be executed.
receive_job : bool
A flag indicating whether the job should be received from an object from 'func' var.
save : bool
A flag indicating whether the job should be saved.
max_live : bool
A flag indicating whether the job should have a maximum live time.
serializer : dill
json pickel or dill must have a dumps fuction
*args, **kwargs : Any serializable and deserializable
Additional arguments to be passed to the job function.
Returns¶
Source code in toolboxv2/mods/SchedulerManager.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | |
Tools
¶
Bases: MainTool, SchedulerManagerClass
Source code in toolboxv2/mods/SchedulerManager.py
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 | |
register_instance(job_data)
¶
example dicts
{ "job_id": "job0", "second": 0, "func": None, "job": None, "time_passer": None, "object_name": "tb_job_fuction", "receive_job": False, "save": False, "max_live": True, # just lev it out "serializer": serializer_default, "args": [], "kwargs": {}, }
job_id : str id for the job for management second (optional): int The time interval in seconds between each call of the job. func (optional): Callable or str The function to be executed as the job. job (optional): schedule.Job An existing job object from the schedule library. time_passer (optional): schedule.Job A job without a function, used to specify the time interval. object_name (optional): str The name of the object containing in the 'func' var to be executed. receive_job (optional): bool A flag indicating whether the job should be received from an object from 'func' var. save (optional): bool A flag indicating whether the job should be saved. max_live (optional): bool A flag indicating whether the job should have a maximum live time. serializer (optional): bool json pickel or dill must have a dumps fuction args, *kwargs (optional): Additional arguments to be passed to the job function.
Parameters ---------- job_data : dict
example usage ---------- `python
`
Source code in toolboxv2/mods/SchedulerManager.py
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 | |
SocketManager
¶
The SocketManager Supports 2 types of connections 1. Client Server 2. Peer to Peer
TruthSeeker
¶
arXivCrawler
¶
ArXiv Crawler for TruthSeeker. Main module for processing research queries.
ArXivPDFProcessor
¶
Main processor for research queries. This is a wrapper around the new ResearchProcessor for backward compatibility.
Source code in toolboxv2/mods/TruthSeeker/arXivCrawler.py
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 | |
__init__(query, tools, chunk_size=1000000, overlap=2000, max_workers=None, num_search_result_per_query=6, max_search=6, download_dir='pdfs', callback=None, num_workers=None)
¶
Initialize the ArXiv PDF processor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
str
|
Research query |
required |
tools
|
Tools module |
required | |
chunk_size
|
int
|
Size of text chunks for processing |
1000000
|
overlap
|
int
|
Overlap between chunks |
2000
|
max_workers
|
Maximum number of worker threads |
None
|
|
num_search_result_per_query
|
Number of search results per query |
6
|
|
max_search
|
Maximum number of search queries |
6
|
|
download_dir
|
Directory to save downloaded files |
'pdfs'
|
|
callback
|
Callback function for status updates |
None
|
|
num_workers
|
Number of worker threads |
None
|
Source code in toolboxv2/mods/TruthSeeker/arXivCrawler.py
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | |
estimate_processing_metrics(query_length, **config)
staticmethod
¶
Return estimated time (seconds) and price for processing.
Source code in toolboxv2/mods/TruthSeeker/arXivCrawler.py
422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 | |
search_and_process_papers(queries)
async
¶
Search for and process papers based on queries.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
queries
|
list[str]
|
List of search queries |
required |
Returns:
| Type | Description |
|---|---|
list[Paper]
|
List of processed papers |
Source code in toolboxv2/mods/TruthSeeker/arXivCrawler.py
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 | |
send_status(step, progress=None, additional_info='')
¶
Send status update via callback.
Source code in toolboxv2/mods/TruthSeeker/arXivCrawler.py
322 323 324 325 326 327 328 329 330 | |
main(query='Beste strategien in bretspielen sitler von katar')
async
¶
Main execution function
Source code in toolboxv2/mods/TruthSeeker/arXivCrawler.py
451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 | |
nGui
¶
import colorsys import json import time from datetime import datetime, timedelta from queue import Queue from typing import Dict, Union, List, Any
import os import random from threading import Thread, Event
import networkx as nx from dataclasses import asdict
from toolboxv2 import get_app from toolboxv2.mods.FastApi.fast_nice import register_nicegui
import asyncio
from nicegui import ui
from pathlib import Path import stripe
from toolboxv2.mods.TruthSeeker.arXivCrawler import Paper from toolboxv2.mods.isaa.base.AgentUtils import anything_from_str_to_dict
Set your secret key (use environment variables in production!)¶
stripe.api_key = os.getenv('STRIPE_SECRET_KEY', 'sk_test_YourSecretKey')
def create_landing_page(): # Set up dynamic background ui.query("body").style("background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%)")
# Main container with enhanced responsive design
with ui.column().classes(
"w-full max-w-md p-8 rounded-3xl shadow-2xl "
"items-center self-center mx-auto my-8"
):
# Advanced styling for glass-morphism effect
ui.query(".nicegui-column").style("""
background: rgba(255, 255, 255, 0.05);
backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.1);
transition: all 0.3s ease-in-out;
""")
# Animated logo/brand icon
with ui.element("div").classes("animate-fadeIn"):
ui.icon("science").classes(
"text-7xl mb-6 text-primary "
"transform hover:scale-110 transition-transform"
)
# Enhanced typography for title
ui.label("TruthSeeker").classes(
"text-5xl font-black text-center "
"text-primary mb-2 animate-slideDown"
)
# Stylized subtitle with brand message
ui.label("Precision. Discovery. Insights.").classes(
"text-xl font-medium text-center "
"mb-10 animate-fadeIn"
)
# Button container for consistent spacing
ui.button(
"Start Research",
on_click=lambda: ui.navigate.to("/open-Seeker.seek")
).classes(
"w-full px-6 py-4 text-lg font-bold "
"bg-primary hover:bg-primary-dark "
"transform hover:-translate-y-0.5 "
"transition-all duration-300 ease-in-out "
"rounded-xl shadow-lg animate-slideUp"
)
# Navigation links container
with ui.element("div").classes("mt-8 space-y-3 text-center"):
ui.link(
"Demo video",
).classes(
"block text-lg text-gray-200 hover:text-primary "
"transition-colors duration-300 animate-fadeIn"
).on("click", lambda: ui.navigate.to("/open-Seeker.demo"))
ui.link(
"About Us",
).classes(
"block text-lg text-gray-400 hover:text-primary "
"transition-colors duration-300 animate-fadeIn"
).on("click", lambda: ui.navigate.to("/open-Seeker.about"))
def create_video_demo(): with ui.card().classes('w-full max-w-3xl mx-auto').style( 'background: var(--background-color); color: var(--text-color)'): # Video container with responsive aspect ratio with ui.element('div').classes('relative w-full aspect-video'): video = ui.video('../api/TruthSeeker/video').classes('w-full h-full object-cover')
# Custom controls overlay
with ui.element('div').classes('absolute bottom-0 left-0 right-0 bg-black/50 p-2'):
with ui.row().classes('items-center gap-2'):
#play_btn = ui.button(icon='play_arrow', on_click=lambda: video.props('playing=true'))
#pause_btn = ui.button(icon='pause', on_click=lambda: video.props('playing=false'))
ui.slider(min=0, max=100, value=0).classes('w-full').bind_value(video, 'time')
#mute_btn = ui.button(icon='volume_up', on_click=lambda: video.props('muted=!muted'))
#fullscreen_btn = ui.button(icon='fullscreen', on_click=lambda: video.props('fullscreen=true'))
# Video description
ui.markdown('Walkthrough of TruthSeeker features and capabilities.')
# Back to Home Button
ui.button('Back to Home', on_click=lambda: ui.navigate.to('/open-Seeker')).classes(
'mt-6 w-full bg-primary text-white hover:opacity-90'
)
return video
def create_about_page(): """Create a comprehensive About page for TruthSeeker""" with ui.column().classes('w-full max-w-4xl mx-auto p-6'): # Page Header ui.label('About TruthSeeker').classes('text-4xl font-bold text-primary mb-6')
# Mission Statement
with ui.card().classes('w-full mb-6').style(
'background: var(--background-color); color: var(--text-color); padding: 20px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);'
):
ui.label('Our Mission').classes('text-2xl font-semibold text-primary mb-4')
ui.markdown("""
TruthSeeker aims to democratize access to scientific knowledge,
transforming complex academic research into comprehensible insights.
We bridge the gap between raw data and meaningful understanding.
""").classes('text-lg').style('color: var(--text-color);')
# Core Technologies
with ui.card().classes('w-full mb-6').style(
'background: var(--background-color); color: var(--text-color); padding: 20px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);'
):
ui.label('Core Technologies').classes('text-2xl font-semibold text-primary mb-4')
with ui.row().classes('gap-4 w-full'):
with ui.column().classes('flex-1 text-center'):
ui.icon('search').classes('text-4xl text-primary mb-2')
ui.label('Advanced Query Processing').classes('font-bold')
ui.markdown('Intelligent algorithms that extract nuanced research insights.').style(
'color: var(--text-color);')
with ui.column().classes('flex-1 text-center'):
ui.icon('analytics').classes('text-4xl text-primary mb-2')
ui.label('Semantic Analysis').classes('font-bold')
ui.markdown('Deep learning models for comprehensive research verification.').style(
'color: var(--text-color);')
with ui.column().classes('flex-1 text-center'):
ui.icon('verified').classes('text-4xl text-primary mb-2')
ui.label('Research Validation').classes('font-bold')
ui.markdown('Multi-layered verification of academic sources.').style('color: var(--text-color);')
# Research Process
with ui.card().classes('w-full').style('background: var(--background-color);color: var(--text-color);'):
ui.label('Research Discovery Process').classes('text-2xl font-semibold text-primary mb-4')
with ui.card().classes('q-pa-md q-mx-auto').style(
'max-width: 800px; background: var(--background-color); border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);'
) as card:
ui.markdown("# Research Workflow").style(
"color: var(--primary-color); text-align: center; margin-bottom: 20px;")
ui.markdown(
"""
Welcome to TruthSeeker’s interactive research assistant. Follow the steps below to transform your initial inquiry into a refined, actionable insight.
"""
).style("color: var(--text-color); text-align: center; margin-bottom: 30px;")
# The stepper component
with ui.stepper().style('background: var(--background-color); color: var(--text-color);') as stepper:
# Step 1: Query Initialization
with ui.step('Query Initialization'):
ui.markdown("### Step 1: Query Initialization").style("color: var(--primary-color);")
ui.markdown(
"""
Begin by entering your research question or selecting from popular academic domains.
This sets the direction for our semantic analysis engine.
"""
).style("color: var(--text-color); margin-bottom: 20px;")
with ui.stepper_navigation():
ui.button('Next', on_click=stepper.next).props('rounded color=primary')
# Step 2: Semantic Search
with ui.step('Semantic Search'):
ui.markdown("### Step 2: Semantic Search").style("color: var(--primary-color);")
ui.markdown(
"""
Our advanced algorithms now process your input to generate context-rich queries.
This stage refines the search context by understanding the deeper intent behind your question.
"""
).style("color: var(--text-color); margin-bottom: 20px;")
with ui.stepper_navigation():
ui.button('Back', on_click=stepper.previous).props('flat')
ui.button('Next', on_click=stepper.next).props('rounded color=primary')
# Step 3: Document Analysis
with ui.step('Document Analysis'):
ui.markdown("### Step 3: Document Analysis").style("color: var(--primary-color);")
ui.markdown(
"""
The system then dives into a detailed analysis of academic papers, parsing content to extract key insights and connections.
This ensures that even subtle but crucial information is captured.
"""
).style("color: var(--text-color); margin-bottom: 20px;")
with ui.stepper_navigation():
ui.button('Back', on_click=stepper.previous).props('flat')
ui.button('Next', on_click=stepper.next).props('rounded color=primary')
# Step 4: Insight Generation
with ui.step('Insight Generation'):
ui.markdown("### Step 4: Insight Generation").style("color: var(--primary-color);")
ui.markdown(
"""
Finally, we synthesize the analyzed data into clear, actionable research summaries.
These insights empower you with concise guidance to drive further inquiry or practical application.
"""
).style("color: var(--text-color); margin-bottom: 20px;")
with ui.stepper_navigation():
ui.button('Back', on_click=stepper.previous).props('flat')
# Back to Home Button
ui.button('Back to Home', on_click=lambda: ui.navigate.to('/open-Seeker')).classes(
'mt-6 w-full bg-primary text-white hover:opacity-90'
)
Dummy-Implementierung für get_tools()¶
def get_tools(): """ Hier solltest du dein richtiges Werkzeug-Objekt zurückliefern. In diesem Beispiel gehen wir davon aus, dass du über eine Funktion wie get_app verfügst. """ return get_app("ArXivPDFProcessor", name=None).get_mod("isaa")
def create_graph_tab(processor_instance: Dict, graph_ui: ui.element, main_ui: ui.element): """Create and update the graph visualization"""
# Get HTML graph from processor
_html_content = processor_instance["instance"].tools.get_memory(processor_instance["instance"].mem_name)
html_content = "" if isinstance(_html_content, list) else _html_content.vis(get_output_html=True)
# Ensure static directory exists
static_dir = Path('dist/static')
static_dir.mkdir(exist_ok=True)
# Save HTML to static file
graph_file = static_dir / f'graph{processor_instance["instance"].mem_name}.html'
# Save HTML to static file with added fullscreen functionality
# Add fullscreen JavaScript
graph_file.write_text(html_content, encoding='utf-8')
with main_ui:
# Clear existing content except fullscreen button
graph_ui.clear()
with graph_ui:
ui.html(f"""
<iframe
src="/static/graph{processor_instance["instance"].mem_name}.html"
style="width: 100%; height: 800px; border: none; background: #1a1a1a;"
>
</iframe>
""").classes('w-full h-full')
is_init = [False]
--- Database Setup ---¶
def get_db(): db = get_app().get_mod("DB") if not is_init[0]: is_init[0] = True db.edit_cli("LD") db.initialize_database() return db
import pickle
--- Session State Management ---¶
def get_user_state(session_id: str, is_new=False) -> dict: db = get_db() state_ = { 'balance': .5, 'last_reset': datetime.utcnow().isoformat(), 'research_history': [], 'payment_id': '', } if session_id is None: state_['balance'] *= -1 if is_new: return state_, True return state_ state = db.get(f"TruthSeeker::session:{session_id}") if state.get() is None: state = state_ if is_new: return state_, True else: try: state = pickle.loads(state.get()) except Exception as e: print(e) state = { 'balance': 0.04, 'last_reset': datetime.utcnow().isoformat(), 'research_history': ["Sorry we had an error recreating your state"], 'payment_id': '', } if is_new: return state, True if is_new: return state, False return state
def save_user_state(session_id: str, state: dict): db = get_db() print("Saving state") db.set(f"TruthSeeker::session:{session_id}", pickle.dumps(state)).print()
def delete_user_state(session_id: str): db = get_db() print("Saving state") db.delete(f"TruthSeeker::session:{session_id}").print()
def reset_daily_balance(state: dict, valid=False) -> dict: now = datetime.utcnow() last_reset = datetime.fromisoformat(state.get('last_reset', now.isoformat())) if now - last_reset > timedelta(hours=24): state['balance'] = max(state.get('balance', 1.6 if valid else 0.5), 1.6 if valid else 0.5) state['last_reset'] = now.isoformat() return state
class MemoryResultsDisplay
def init(self, results: List[Dict[str, Any]], main_ui: ui.element): self.results = results self.main_ui = main_ui self.setup_ui()
def setup_ui(self): """Set up the main UI for displaying memory results""" with self.main_ui: self.main_ui.clear() with ui.column().classes('w-full'): for mem_result in self.results: self.create_memory_card(mem_result)
def create_memory_card(self, mem_result: Dict[str, Any]): """Create a card for each memory result""" result = mem_result.get("result", {}) with self.main_ui: if isinstance(result, dict): self.display_dict_result(result) elif hasattr(result, 'overview'): # Assuming RetrievalResult type self.display_retrieval_result(result) else: ui.label("Unsupported result type").classes('--text-color:error')
def display_dict_result(self, result: Dict[str, Any]): """Display dictionary-based result with collapsible sections""" # Summary Section summary = result.get("summary", {}) if isinstance(summary, str): try: summary = json.loads(summary[:-1]) except json.JSONDecodeError: summary = {"error": "Could not parse summary"}
# Raw Results Section
raw_results = result.get("raw_results", {})
if isinstance(raw_results, str):
try:
raw_results = json.loads(raw_results[:-1])
except json.JSONDecodeError:
raw_results = {"error": "Could not parse raw results"}
# Metadata Section
metadata = result.get("metadata", {})
with self.main_ui:
# Collapsible Sections
with ui.column().classes('w-full space-y-2').style("max-width: 100%;"):
# Summary Section
with ui.expansion('Summary', icon='description').classes('w-full') as se:
self.display_nested_data(summary, main_ui=se)
# Raw Results Section
with ui.expansion('Raw Results', icon='work').classes('w-full') as re:
self.display_nested_data(raw_results, main_ui=re)
# Metadata Section
if metadata:
with ui.expansion('Metadata', icon='info').classes('w-full'):
ui.markdown(f"```json
{json.dumps(metadata, indent=2)} ```").style("max-width: 100%;")
def display_retrieval_result(self, result):
"""Display retrieval result with detailed sections"""
with self.main_ui:
with ui.column().classes('w-full space-y-4').style("max-width: 100%;"):
# Overview Section
with ui.expansion('Overview', icon='visibility').classes('w-full') as ov:
for overview_item in result.overview:
if isinstance(overview_item, str):
overview_item = json.loads(overview_item)
self.display_nested_data(overview_item, main_ui=ov)
# Details Section
with ui.expansion('Details', icon='article').classes('w-full'):
for chunk in result.details:
with ui.card().classes('w-full p-3 mb-2').style("background: var(--background-color)"):
ui.label(chunk.text).classes('font-medium mb-2 --text-color:secondary')
with ui.row().classes('w-full justify-between').style("background: var(--background-color)"):
ui.label(f"Embedding Shape: {chunk.embedding.shape}").classes('text-sm')
ui.label(f"Content Hash: {chunk.content_hash}").classes('text-sm')
if chunk.cluster_id is not None:
ui.label(f"Cluster ID: {chunk.cluster_id}").classes('text-sm')
# Cross References Section
with ui.expansion('Cross References', icon='link').classes('w-full'):
for topic, chunks in result.cross_references.items():
with ui.card().classes('w-full p-3 mb-2').style("background: var(--background-color)"):
ui.label(topic).classes('font-semibold mb-2 --text-color:secondary')
for chunk in chunks:
ui.label(chunk.text).classes('text-sm mb-1')
def display_nested_data(self, data: Union[Dict, List], indent: int = 0, main_ui=None):
"""Recursively display nested dictionary or list data"""
with (self.main_ui if main_ui is None else main_ui):
if isinstance(data, dict):
with ui.column().classes(f'ml-{indent * 2}').style("max-width: 100%;"):
for key, value in data.items():
with ui.row().classes('items-center'):
ui.label(f"{key}:").classes('font-bold mr-2 --text-color:primary')
if isinstance(value, list):
if key == "main_chunks":
continue
self.display_nested_data(value, indent + 1, main_ui=main_ui)
if isinstance(value, dict):
ui.markdown(f"```json
{json.dumps(value, indent=2)}
").classes("break-words w-full").style("max-width: 100%;")
else:
ui.label(str(value)).classes('--text-color:secondary')
elif isinstance(data, list):
with ui.column().classes(f'ml-{indent * 2}').style("max-width: 100%;"):
for item in data:
if isinstance(item, str):
item = json.loads(item)
if isinstance(item, list):
self.display_nested_data(item, indent + 1, main_ui=main_ui)
if isinstance(item, dict):
ui.markdown(f"json
{json.dumps(item, indent=2)}
```").classes("break-words w-full").style("max-width: 100%;")
else:
ui.label(str(item)).classes('--text-color:secondary')
def create_followup_section(processor_instance: Dict, main_ui: ui.element, session_id, balance): main_ui.clear() with main_ui: ui.label("Query Interface (1ct)").classes("text-xl font-semibold mb-4")
# Container for query inputs
query_container = ui.column().classes("w-full gap-4")
query = "" # Store references to query inputs
# Query parameters section
with ui.expansion("Query Parameters", icon="settings").classes("w-full") as query_e:
with ui.grid(columns=2).classes("w-full gap-4"):
k_input = ui.number("Results Count (k)", value=2, min=1, max=20)
min_sim = ui.number("Min Similarity", value=.3, min=0, max=1, step=0.1)
cross_depth = ui.number("Cross Reference Depth", value=2, min=1, max=5)
max_cross = ui.number("Max Cross References", value=10, min=1, max=20)
max_sent = ui.number("Max Sentences", value=10, min=1, max=50)
unified = ui.switch("Unified Retrieve (+3ct)", value=True)
# Results display
with ui.element("div").classes("w-full mt-4") as results_display:
pass
results_display = results_display
with query_container:
query_input = ui.input("Query", placeholder="Enter your query...") .classes("w-full")
# Control buttons
with ui.row().classes("w-full gap-4 mt-4"):
ui.button("Execute Query", on_click=lambda: asyncio.create_task(execute_query())) .classes("bg-green-600 hover:bg-green-700")
ui.button("Clear Results", on_click=lambda: results_display.clear()) .classes("bg-red-600 hover:bg-red-700")
query_input = query_input
async def execute_query():
"""Execute a single query with parameters"""
nonlocal query_input, results_display, main_ui
try:
query_text = query_input.value
if not query_text.strip():
with main_ui:
ui.notify("No Input", type="warning")
return ""
if not processor_instance.get("instance"):
with main_ui:
ui.notify("No active processor instance", type="warning")
return
# Collect parameters
params = {
"k": int(k_input.value),
"min_similarity": min_sim.value,
"cross_ref_depth": int(cross_depth.value),
"max_cross_refs": int(max_cross.value),
"max_sentences": int(max_sent.value),
"unified": unified.value
}
# Construct query parameters
query_params = {
"k": params["k"],
"min_similarity": params["min_similarity"],
"cross_ref_depth": params["cross_ref_depth"],
"max_cross_refs": params["max_cross_refs"],
"max_sentences": params["max_sentences"]
}
# Execute query
results = await processor_instance["instance"].extra_query(
query=query_text,
query_params=query_params,
unified_retrieve=params["unified"]
)
print("results",results)
s = get_user_state(session_id)
s['balance'] -= .04 if unified.value else .01
save_user_state(session_id, s)
with main_ui:
balance.set_text(f"Balance: {s['balance']:.2f}€")
# Format results
with main_ui:
with results_display:
MemoryResultsDisplay(results, results_display)
except Exception as e:
return f"Error executing query: {str(e)}
"
# Add initial query input
online_states = [0] def create_research_interface(Processor):
def helpr(request, session: dict):
state = {'balance':0, 'research_history': []}
main_ui = None
with ui.column().classes("w-full max-w-6xl mx-auto p-6 space-y-6") as loading:
ui.spinner(size='lg')
ui.label('Initializing...').classes('ml-2')
# Container for main content (initially hidden)
content = ui.column().classes('hidden')
# Extract session data before spawning thread
session_id = session.get('ID')
session_id_h = session.get('IDh')
session_rid = request.row.query_params.get('session_id') if hasattr(request, 'row') else request.query_params.get('session_id')
session_valid = session.get('valid')
# Thread communication
result_queue = Queue()
ready_event = Event()
def init_background():
nonlocal session_id, session_id_h, session_rid, session_valid
try:
# Original initialization logic
_state, is_new = get_user_state(session_id, is_new=True)
if is_new and session_id_h != "#0":
_state = get_user_state(session_id_h)
save_user_state(session_id, _state)
delete_user_state(session_id_h)
if session_rid:
state_: dict
state_, is_new_ = get_user_state(session_rid, is_new=True)
if not is_new_:
_state = state_.copy()
state_['payment_id'] = ''
state_['last_reset'] = datetime.utcnow().isoformat()
state_['research_history'] = state_['research_history'][:3]
state_['balance'] = 0
save_user_state(session_id, _state)
_state = reset_daily_balance(_state, session_valid)
save_user_state(session_id, _state)
# Send result back to main thread
result_queue.put(_state)
ready_event.set()
except Exception as e:
result_queue.put(e)
ready_event.set()
# Start background initialization
Thread(target=init_background).start()
def check_ready():
nonlocal state
if ready_event.is_set():
result = result_queue.get()
# Check if initialization failed
if isinstance(result, Exception):
loading.clear()
with loading:
ui.label(f"Error during initialization: {str(result)}").classes('text-red-500')
return
# Get state and build main UI
state = result
loading.classes('hidden')
content.classes(remove='hidden')
main_ui.visible = True
with main_ui:
balance.set_text(f"Balance: {state['balance']:.2f}€")
show_history()
return # Stop the timer
# Check again in 100ms
ui.timer(0.1, check_ready, once=True)
# Start checking for completion
check_ready()
# Wir speichern die aktive Instanz, damit Follow-Up Fragen gestellt werden können
processor_instance = {"instance": None}
# UI-Elemente als Platzhalter; wir definieren sie später in der UI und machen sie so
# in den Callback-Funktionen über "nonlocal" verfügbar.
overall_progress = None
status_label = None
results_card = None
summary_content = None
analysis_content = None
references_content = None
followup_card = None
research_card = None
config_cart = None
progress_card = None
balance = None
graph_ui = None
sr_button = None
r_button = None
r_text = None
# Global config storage with default values
config = {
'chunk_size': 21000,
'overlap': 600,
'num_search_result_per_query': 3,
'max_search': 3,
'num_workers': None
}
def update_estimates():
"""
Dummy estimation based on query length and configuration.
(Replace with your own non-linear formula if needed.)
"""
query_text = query.value or ""
query_length = len(query_text)
# For example: estimated time scales with chunk size and query length.
estimated_time ,estimated_price = Processor.estimate_processing_metrics(query_length, **config)
estimated_time *= max(1, online_states[0] * 6)
if processor_instance["instance"] is not None:
estimated_price += .25
if estimated_time < 60:
time_str = f"~{int(estimated_time)}s"
elif estimated_time < 3600:
minutes = estimated_time // 60
seconds = estimated_time % 60
time_str = f"~{int(minutes)}m {int(seconds)}s"
else:
hours = estimated_time // 3600
minutes = (estimated_time % 3600) // 60
time_str = f"~{int(hours)}h {int(minutes)}m"
with main_ui:
query_length_label.set_text(f"Total Papers: {config['max_search']*config['num_search_result_per_query']}")
time_label.set_text(f"Processing Time: {time_str}")
price_label.set_text(f"Price: {estimated_price:.2f}€")
return estimated_price
def on_config_change(event):
"""
Update the global config based on input changes and recalc estimates.
"""
try:
config['chunk_size'] = int(chunk_size_input.value)
except ValueError:
pass
try:
config['overlap'] = int(overlap_input.value)
if config['overlap'] > config['chunk_size'] / 4:
config['overlap'] = int(config['chunk_size'] / 4)
with main_ui:
overlap_input.value = config['overlap']
except ValueError:
pass
try:
config['num_search_result_per_query'] = int(num_search_result_input.value)
except ValueError:
pass
try:
config['max_search'] = int(max_search_input.value)
except ValueError:
pass
try:
config['num_workers'] = int(num_workers_input.value) if num_workers_input.value != 0 else None
except ValueError:
config['num_workers'] = None
update_estimates()
def on_query_change():
update_estimates()
# Callback, der vom Processor (über processor_instance.callback) aufgerufen wird.
def update_status(data: dict):
nonlocal overall_progress, status_label
if not data:
return
# Aktualisiere den Fortschrittsbalken und den aktuellen Schritt (wenn vorhanden)
with main_ui:
if isinstance(data, dict):
progress = data.get("progress", 0)
step = data.get("step", "Processing...")
overall_progress.value =round( progress ,2) # nicegui.linear_progress erwartet einen Wert zwischen 0 und 1
status_label.set_text(f"{step} {data.get('info','')}")
else:
status_label.set_text(f"{data}")
def start_search():
nonlocal balance
async def helper():
nonlocal processor_instance, overall_progress, status_label, results_card, summary_content, analysis_content,config, references_content, followup_card,sr_button,r_button,r_text
try:
if not validate_inputs():
with main_ui:
state['balance'] += est_price
save_user_state(session_id, state)
balance.set_text(f"Balance: {state['balance']:.2f}€")
return
reset_interface()
show_progress_indicators()
query_text = query.value.strip()
# Erzeuge das "tools"-Objekt (abhängig von deiner konkreten Implementation)
tools = get_tools()
with main_ui:
research_card.visible = False
config_cart.visible = False
config_section.visible = False
query.set_value("")
# Direkt instanziieren: Eine neue ArXivPDFProcessor-Instanz
if processor_instance["instance"] is not None:
processor = processor_instance["instance"]
processor.chunk_size = config['chunk_size']
processor.overlap = config['overlap']
processor.num_search_result_per_query = config['num_search_result_per_query']
processor.max_search = config['max_search']
processor.num_workers = config['num_workers']
papers, insights = await processor.process(query_text)
else:
processor = Processor(query_text, tools=tools, **config)
# Setze den Callback so, dass Updates in der GUI angezeigt werden
processor.callback = update_status
processor_instance["instance"] = processor
papers, insights = await processor.process()
update_results({
"papers": papers,
"insights": insights
})
with main_ui:
research_card.visible = True
config_cart.visible = True
show_history()
except Exception as e:
import traceback
with main_ui:
update_status({"progress": 0, "step": "Error", "info": str(e)})
state['balance'] += est_price
save_user_state(session_id, state)
balance.set_text(f"Balance: {state['balance']:.2f}€")
ui.notify(f"Error {str(e)})", type="negative")
research_card.visible = True
config_cart.visible = True
config_section.visible = True
print(traceback.format_exc())
def target():
get_app().run_a_from_sync(helper, )
est_price = update_estimates()
if est_price > state['balance']:
with main_ui:
ui.notify(f"Insufficient balance. Need €{est_price:.2f}", type='negative')
else:
state['balance'] -= est_price
save_user_state(session_id, state)
with main_ui:
online_states[0] += 1
balance.set_text(f"Balance: {state['balance']:.2f}€ Running Queries: {online_states[0]}")
Thread(target=target, daemon=True).start()
with main_ui:
online_states[0] -= 1
balance.set_text(f"Balance: {get_user_state(session_id)['balance']:.2f}€")
def show_history():
with config_cart:
for idx, entry in enumerate(state['research_history']):
with ui.card().classes("w-full backdrop-blur-lg bg-white/10 p-4"):
ui.label(entry['query']).classes('text-sm')
ui.button("Open").on_click(lambda _, i=idx: load_history(i))
def reset():
nonlocal processor_instance, results_card, followup_card, sr_button, r_button, r_text
processor_instance["instance"] = None
show_progress_indicators()
with main_ui:
config_cart.visible = False
config_section.visible = False
followup_card.visible = False
results_card.visible = False
r_button.visible = False
r_text.set_text("Research Interface")
sr_button.set_text("Start Research")
start_search()
# UI-Aufbau
with ui.column().classes("w-full max-w-6xl mx-auto p-6 space-y-6") as main_ui:
balance = ui.label(f"Balance: {state['balance']:.2f}€").classes("text-s font-semibold")
config_cart = config_cart
# --- Research Input UI Card ---
with ui.card().classes("w-full backdrop-blur-lg bg-white/10 p-4") as research_card:
r_text = ui.label("Research Interface").classes("text-3xl font-bold mb-4")
# Query input section with auto-updating estimates
query = ui.input("Research Query",
placeholder="Gib hier deine Forschungsfrage ein...",
value="") .classes("w-full min-h-[100px]") .on('change', lambda e: on_query_change()).style("color: var(--text-color)")
# --- Action Buttons ---
with ui.row().classes("mt-4"):
sr_button =ui.button("Start Research", on_click=start_search) .classes("bg-blue-600 hover:bg-blue-700 py-3 rounded-lg")
ui.button("toggle config",
on_click=lambda: setattr(config_section, 'visible', not config_section.visible) or show_progress_indicators()).style(
"color: var(--text-color)")
r_button = ui.button("Start new Research",
on_click=reset).style(
"color: var(--text-color)")
sr_button = sr_button
r_button = r_button
r_button.visible = False
research_card = research_card
# --- Options Cart / Configurations ---
with ui.card_section().classes("w-full backdrop-blur-lg bg-white/10 hidden") as config_section:
ui.separator()
ui.label("Configuration Options").classes("text-xl font-semibold mt-4 mb-2")
with ui.row():
chunk_size_input = ui.number(label="Chunk Size",
value=config['chunk_size'], format='%.0f', max=64_000, min=1000,
step=100) .on('change', on_config_change).style("color: var(--text-color)")
overlap_input = ui.number(label="Overlap",
value=config['overlap'], format='%.0f', max=6400, min=100, step=50) .on('change', on_config_change).style("color: var(--text-color)")
with ui.row():
num_search_result_input = ui.number(label="Results per Query",
value=config['num_search_result_per_query'], format='%.0f',
min=1, max=100, step=1) .on('change', on_config_change).style("color: var(--text-color)")
max_search_input = ui.number(label="Max Search Queries",
value=config['max_search'], format='%.0f', min=1, max=100, step=1) .on('change', on_config_change).style("color: var(--text-color)")
num_workers_input = ui.number(label="Number of Workers (leave empty for default)",
value=0, format='%.0f', min=0, max=32, step=1) .on('change', on_config_change).style("color: var(--text-color)")
config_section = config_section
config_section.visible = False
# --- Ergebnisse anzeigen ---
with ui.card().classes("w-full backdrop-blur-lg p-4 bg-white/10") as results_card:
ui.label("Research Results").classes("text-xl font-semibold mb-4")
with ui.tabs() as tabs:
ui.tab("Summary")
ui.tab("References")
ui.tab("SystemStates")
with ui.tab_panels(tabs, value="Summary").classes("w-full").style("background-color: var(--background-color)"):
with ui.tab_panel("Summary"):
summary_content = ui.markdown("").style("color : var(--text-color)")
with ui.tab_panel("References"):
references_content = ui.markdown("").style("color : var(--text-color)")
with ui.tab_panel("SystemStates"):
analysis_content = ui.markdown("").style("color : var(--text-color)")
# Ergebnisse sichtbar machen, sobald sie vorliegen.
results_card = results_card
results_card.visible = False
# --- Follow-Up Bereich mit mehrfachen Folgefragen und Suchparametern ---
with ui.card().classes("w-full backdrop-blur-lg bg-white/10 p-4 hidden") as followup_card:
pass
# Zugriff auf followup_card (falls später benötigt)
followup_card = followup_card
followup_card.visible = False
# --- Fortschrittsanzeige ---
with ui.card().classes("w-full backdrop-blur-lg bg-white/10 p-4") as progress_card:
with ui.row():
ui.label("Research Progress").classes("text-xl font-semibold mb-4")
query_length_label = ui.label("").classes("mt-6 hover:text-primary transition-colors duration-300")
time_label = ui.label("Time: ...").classes("mt-6 hover:text-primary transition-colors duration-300")
price_label = ui.label("Price: ...").classes(
"mt-6 hover:text-primary transition-colors duration-300")
overall_progress = ui.linear_progress(0).classes("w-full mb-4")
status_label = ui.label("Warte auf Start...").classes("text-base")
# Wir merken uns progress_card, falls wir ihn zurücksetzen wollen.
progress_card = progress_card
query_length_label = query_length_label
time_label = time_label
price_label = price_label
with ui.card().classes("w-full backdrop-blur-lg bg-white/10 p-4") as config_cart:
# --- Process Code Section ---
# --- Estimated Time and Price ---
# ui.label("History").classes("text-xl font-semibold mt-4 mb-2")
ui.label('Research History').classes('text-xl p-4')
show_history()
ui.button('Add Credits', on_click=lambda: balance_overlay(session_id)).props('icon=paid')
ui.label('About TruthSeeker').classes(
'mt-6 text-gray-500 hover:text-primary '
'transition-colors duration-300'
).on('click', lambda: ui.navigate.to('/open-Seeker.about', new_tab=True))
with ui.element('div').classes("w-full").style("white:100%; height:100%") as graph_ui:
pass
with ui.card().classes("w-full p-4").style("background-color: var(--background-color)"):
ui.label("Private Session link (restore the session on a different device)")
base_url = f'https://{os.getenv("HOSTNAME")}/gui/open-Seeker.seek' if not 'localhost' in os.getenv("HOSTNAME") else 'http://localhost:5000/gui/open-Seeker.seek'
ui.label(f"{base_url}?session_id={session_id}").style("white:100%")
ui.label("Changes each time!")
graph_ui = graph_ui
graph_ui.visible = False
main_ui = main_ui
main_ui.visible = False
# --- Hilfsfunktionen ---
def validate_inputs() -> bool:
if not query.value.strip():
with main_ui:
ui.notify("Bitte gib eine Forschungsfrage ein.", type="warning")
return False
return True
def reset_interface():
nonlocal overall_progress, status_label, results_card, followup_card
overall_progress.value = 0
with main_ui:
status_label.set_text("Research startet...")
# Ergebnisse und Follow-Up Bereich verstecken
results_card.visible = False
followup_card.visible = False
graph_ui.visible = False
def show_progress_indicators():
nonlocal progress_card
progress_card.visible = True
def update_results(data: dict, save=True):
nonlocal summary_content, analysis_content, references_content, results_card, followup_card,graph_ui, r_button, r_text, sr_button
with main_ui:
r_button.visible = True
r_text.set_text("Add to current Results or press 'Start new Research'")
sr_button.set_text("Add to current Results")
# Handle papers (1-to-1 case)
papers = data.get("papers", [])
if not isinstance(papers, list):
papers = [papers]
# Get insights
insights = data.get("insights", [])
if save:
history_entry = data.copy()
history_entry['papers'] = [paper.model_dump_json() for paper in papers]
if processor_instance is not None and processor_instance['instance'] is not None:
history_entry["mam_name"] = processor_instance['instance'].mem_name
history_entry["query"] = processor_instance['instance'].query
history_entry["processor_memory"] = processor_instance['instance'].tools.get_memory(
).save_memory(history_entry["mam_name"], None)
state['research_history'].append(history_entry)
save_user_state(session_id, state)
else:
papers = [Paper(**json.loads(paper)) for paper in papers]
create_followup_section(processor_instance, followup_card, session_id, balance)
with main_ui:
progress_card.visible = False
# Build summary from insights
summaries = []
for insight in insights:
if 'result' in insight and 'summary' in insight['result']:
if isinstance(insight['result']['summary'], str):
# print(insight['result']['summary'], "NEXT", json.loads(insight['result']['summary'][:-1]),"NEXT22", type(json.loads(insight['result']['summary'][:-1])))
insight['result']['summary'] = json.loads(insight['result']['summary'][:-1])
main_summary = insight['result']['summary'].get('main_summary', '')
if main_summary:
summaries.append(main_summary)
summary_text = "
".join(summaries) if summaries else "No summary available." summary_content.set_content(f"# Research Summary
{summary_text}")
# Analysis section (unchanged if processor details haven't changed)
if processor_instance["instance"] is not None:
inst = processor_instance["instance"]
analysis_md = (
f"# Analysis
" f"- query: {inst.query} " f"- chunk_size: {inst.chunk_size} " f"- overlap: {inst.overlap} " f"- max_workers: {inst.max_workers} " f"- num_search_result_per_query: {inst.nsrpq} " f"- max_search: {inst.max_search} " f"- download_dir: {inst.download_dir} " f"- mem_name: {inst.mem_name} " f"- current_session: {inst.current_session} " f"- all_ref_papers: {inst.all_ref_papers} " f"- all_texts_len: {inst.all_texts_len} " f"- final_texts_len: {inst.f_texts_len} " f"- num_workers: {inst.num_workers}" ) analysis_content.set_content(analysis_md)
# References and Insights section
references_md = "# References
" # Add papers references_md += " ".join( f"- ({i}) {getattr(paper, 'title', 'Unknown Title')}})" for i, paper in enumerate(papers) )
# Add detailed insights
references_md += "
Insights¶
" for i, insight in enumerate(insights): print(insight) result = insight.get('result', {}) summary = result.get('summary', {})
if isinstance(summary, str):
summary = json.loads(summary)
# Main summary
references_md += f"
Insight¶
" references_md += f"### Main Summary {summary.get('main_summary', 'No summary available.')} "
# Concept Analysis
concept_analysis = summary.get('concept_analysis', {})
if concept_analysis:
references_md += "
Concept Analysis¶
" references_md += "#### Key Concepts - " + " - ".join( concept_analysis.get('key_concepts', [])) + " " references_md += "
Relationships¶
- " + "
- ".join( concept_analysis.get('relationships', [])) + " " references_md += "
Importance Hierarchy¶
- " + "
-
".join( concept_analysis.get('importance_hierarchy', [])) + " "
# Topic Insights topic_insights = summary.get('topic_insights', {}) if topic_insights: references_md += "Topic Insights¶
" references_md += "#### Primary Topics - " + " - ".join( topic_insights.get('primary_topics', [])) + " " references_md += "
Cross References¶
- " + "
- ".join( topic_insights.get('cross_references', [])) + " " references_md += "
Knowledge Gaps¶
- " + "
-
".join( topic_insights.get('knowledge_gaps', [])) + " "
# Relevance Assessment relevance = summary.get('relevance_assessment', {}) if relevance: references_md += "Relevance Assessment¶
" references_md += f"- Query Alignment: {relevance.get('query_alignment', 'N/A')} " references_md += f"- Confidence Score: {relevance.get('confidence_score', 'N/A')} " references_md += f"- Coverage Analysis: {relevance.get('coverage_analysis', 'N/A')} "
references_content.set_content(references_md) # nx concpts graph if processor_instance["instance"] is not None: create_graph_tab( processor_instance, graph_ui,main_ui ) # Show results and followup cards results_card.visible = True followup_card.visible = True graph_ui.visible = Truedef load_history(index: int): entry = state['research_history'][index] if processor_instance is not None and processor_instance['instance'] is not None:
processor_instance["instance"].mem_name = entry["mam_name"] processor_instance['instance'].query = entry["query"] pass else: processor = Processor(entry["query"], tools=get_tools(), **config) # Setze den Callback so, dass Updates in der GUI angezeigt werden processor.callback = update_status processor.mem_name = entry["mam_name"] processor_instance["instance"] = processor processor_instance["instance"].tools.get_memory().load_memory(entry["mam_name"], entry["processor_memory"]) processor_instance["instance"].mem_name = entry["mam_name"] update_results(entry, save=False)
return helpr
--- Stripe Integration ---¶
def regiser_stripe_integration(is_scc=True): def stripe_callback(request: Request):
sid = request.row.query_params.get('session_id') if hasattr(request, 'row') else request.query_params.get('session_id')
state = get_user_state(sid)
if state['payment_id'] == '':
with ui.card().classes("w-full items-center").style("background-color: var(--background-color)"):
ui.label(f"No payment id!").classes("text-lg font-bold")
ui.button(
"Start Research",
on_click=lambda: ui.navigate.to("/open-Seeker.seek?session_id="+sid)
).classes(
"w-full px-6 py-4 text-lg font-bold "
"bg-primary hover:bg-primary-dark "
"transform hover:-translate-y-0.5 "
"transition-all duration-300 ease-in-out "
"rounded-xl shadow-lg animate-slideUp"
)
return
try:
session_data = stripe.checkout.Session.retrieve(state['payment_id'])
except Exception as e:
with ui.card().classes("w-full items-center").style("background-color: var(--background-color)"):
ui.label(f"No Transactions Details !{e}").classes("text-lg font-bold")
ui.button(
"Start Research",
on_click=lambda: ui.navigate.to("/open-Seeker.seek")
).classes(
"w-full px-6 py-4 text-lg font-bold "
"bg-primary hover:bg-primary-dark "
"transform hover:-translate-y-0.5 "
"transition-all duration-300 ease-in-out "
"rounded-xl shadow-lg animate-slideUp"
)
return
with ui.card().classes("w-full items-center").style("background-color: var(--background-color)"):
if is_scc and state['payment_id'] != '' and session_data.payment_status == 'paid':
state = get_user_state(sid)
amount = session_data.amount_total / 100 # Convert cents to euros
state['balance'] += amount
state['payment_id'] = ''
save_user_state(sid, state)
# ui.navigate.to(f'/session?session={session}')
ui.label(f"Transaction Complete - New balance :{state['balance']}").classes("text-lg font-bold")
with ui.card().classes("w-full p-4").style("background-color: var(--background-color)"):
ui.label("Private Session link (restore the session on a different device)")
base_url = f'https://{os.getenv("HOSTNAME")}/gui/open-Seeker.seek' if not 'localhost' in os.getenv("HOSTNAME")else 'http://localhost:5000/gui/open-Seeker.seek'
ui.label(f"{base_url}?session_id={sid}").style("white:100%")
ui.label("Changes each time!")
else:
ui.label(f"Transaction Error! {session_data}, {dir(session_data)}").classes("text-lg font-bold")
ui.button(
"Start Research",
on_click=lambda: ui.navigate.to("/open-Seeker.seek")
).classes(
"w-full px-6 py-4 text-lg font-bold "
"bg-primary hover:bg-primary-dark "
"transform hover:-translate-y-0.5 "
"transition-all duration-300 ease-in-out "
"rounded-xl shadow-lg animate-slideUp"
)
return stripe_callback
def handle_stripe_payment(amount: float, session_id): base_url = f'https://{os.getenv("HOSTNAME")}/gui/open-Seeker.stripe' if not 'localhost' in os.getenv("HOSTNAME") else 'http://localhost:5000/gui/open-Seeker.stripe' session = stripe.checkout.Session.create( payment_method_types=['card', "link", ], line_items=[{ 'price_data': { 'currency': 'eur', 'product_data': {'name': 'Research Credits'}, 'unit_amount': int(amount * 100), }, 'quantity': 1, }], automatic_tax={"enabled": True}, mode='payment', success_url=f'{base_url}?session_id={session_id}', cancel_url=f'{base_url}.error' ) state = get_user_state(session_id) state['payment_id'] = session.id save_user_state(session_id, state) ui.navigate.to(session.url, new_tab=True)
--- UI Components ---¶
def balance_overlay(session_id): with ui.dialog().classes('w-full max-w-md bg-white/20 backdrop-blur-lg rounded-xl') as dialog: with ui.card().classes('w-full p-6 space-y-4').style("background-color: var(--background-color)"): ui.label('Add Research Credits').classes('text-2xl font-bold') amount = ui.number('Amount (€) min 2', value=5, format='%.2f', min=2, max=9999, step=1).classes('w-full') with ui.row().classes('w-full justify-between'): ui.button('Cancel', on_click=dialog.close).props('flat') ui.button('Purchase', on_click=lambda: handle_stripe_payment(amount.value, session_id)) return dialog
def create_ui(processor): # ui_instance = register_nicegui("open-Seeker", create_landing_page , additional=""" """, show=False) register_nicegui("open-Seeker.demo", create_video_demo, additional=""" """, show=False)
newui
¶
cleanup_module(app)
¶
Cleanup resources when the module is unloaded
Source code in toolboxv2/mods/TruthSeeker/newui.py
1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 | |
create_payment(app, data)
async
¶
Create a Stripe payment session
Source code in toolboxv2/mods/TruthSeeker/newui.py
1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 | |
estimate_processing(data)
async
¶
Estimate processing time and cost for a given query
Source code in toolboxv2/mods/TruthSeeker/newui.py
1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 | |
follow_up_query(app, data)
async
¶
Ask a follow-up question about the research
Source code in toolboxv2/mods/TruthSeeker/newui.py
1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 | |
initialize_module(app)
¶
Initialize the module and register UI with CloudM
Source code in toolboxv2/mods/TruthSeeker/newui.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |
payment_cancel(app, session_id, request_as_kwarg=True, request=None)
async
¶
Handle cancelled payment
Source code in toolboxv2/mods/TruthSeeker/newui.py
1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 | |
payment_stream(app, session_id)
async
¶
SSE stream endpoint for payment status updates
Source code in toolboxv2/mods/TruthSeeker/newui.py
1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 | |
payment_success(app, session_id, request_as_kwarg=True, request=None)
async
¶
Handle successful payment
Source code in toolboxv2/mods/TruthSeeker/newui.py
1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 | |
research_results(app, research_id)
async
¶
Get the results of a completed research process
Source code in toolboxv2/mods/TruthSeeker/newui.py
1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 | |
research_status(app, research_id)
async
¶
Get the status of a research process
Source code in toolboxv2/mods/TruthSeeker/newui.py
1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 | |
start_research(app, data)
async
¶
Start a new research process
Source code in toolboxv2/mods/TruthSeeker/newui.py
1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 | |
status_stream(app, research_id)
async
¶
SSE stream endpoint for research status updates
Source code in toolboxv2/mods/TruthSeeker/newui.py
1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 | |
stop_research(app, data)
async
¶
Stop a research process
Source code in toolboxv2/mods/TruthSeeker/newui.py
1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 | |
tests
¶
TestTruthSeeker
¶
Bases: TestCase
Source code in toolboxv2/mods/TruthSeeker/tests.py
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 | |
test_byCode_functionality()
¶
Test the byCode function
Source code in toolboxv2/mods/TruthSeeker/tests.py
337 338 339 340 341 342 343 344 | |
test_codes_invalid_promo()
async
¶
Test the codes function with invalid promo code
Source code in toolboxv2/mods/TruthSeeker/tests.py
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | |
test_codes_valid_request()
async
¶
Test the codes function with valid input
Source code in toolboxv2/mods/TruthSeeker/tests.py
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 | |
test_process_invalid_key()
async
¶
Test the process function with invalid key
Source code in toolboxv2/mods/TruthSeeker/tests.py
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | |
test_process_valid_request()
async
¶
Test the process function with valid input
Source code in toolboxv2/mods/TruthSeeker/tests.py
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 | |
test_start_initialization(mock_open, mock_join)
¶
Test the start function initializes correctly
Source code in toolboxv2/mods/TruthSeeker/tests.py
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | |
run_all_tests()
¶
Run all test classes
Source code in toolboxv2/mods/TruthSeeker/tests.py
393 394 395 396 | |
run_arxiv_processor_tests(test_name=None)
¶
Run TestArXivPDFProcessor tests
Source code in toolboxv2/mods/TruthSeeker/tests.py
380 381 382 | |
run_pdf_downloader_tests(test_name=None)
¶
Run TestRobustPDFDownloader tests
Source code in toolboxv2/mods/TruthSeeker/tests.py
375 376 377 | |
run_specific_test(test_class, test_name)
¶
Run a specific test from a test class
Source code in toolboxv2/mods/TruthSeeker/tests.py
389 390 391 | |
run_test_suite(test_class=None, test_name=None, verbosity=2)
¶
Run specific test class or test case.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
test_class
|
The test class to run (optional) |
None
|
|
test_name
|
Specific test method name to run (optional) |
None
|
|
verbosity
|
Output detail level (default=2) |
2
|
Returns:
| Type | Description |
|---|---|
|
TestResult object |
Source code in toolboxv2/mods/TruthSeeker/tests.py
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 | |
run_truth_seeker_tests(test_name=None)
¶
Run TestTruthSeeker tests
Source code in toolboxv2/mods/TruthSeeker/tests.py
384 385 386 | |
test_arxiv_search()
¶
Run only ArXiv search tests
Source code in toolboxv2/mods/TruthSeeker/tests.py
414 415 416 417 418 419 420 | |
test_pdf_download()
¶
Run only PDF download tests
Source code in toolboxv2/mods/TruthSeeker/tests.py
398 399 400 401 402 403 404 | |
test_truth_seeker()
¶
Run only PDF download tests
Source code in toolboxv2/mods/TruthSeeker/tests.py
406 407 408 409 410 411 412 | |
UltimateTTT
¶
UltimateTTTGameEngine
¶
Source code in toolboxv2/mods/UltimateTTT.py
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 | |
WebSocketManager
¶
Tools
¶
Bases: MainTool
Production-ready WebSocketManager Tool.
Source code in toolboxv2/mods/WebSocketManager.py
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 | |
broadcast_to_pool(pool_id, event, data)
async
¶
Broadcast message to all connections in a pool.
Source code in toolboxv2/mods/WebSocketManager.py
619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 | |
create_client(client_id)
¶
Create a WebSocket client.
Source code in toolboxv2/mods/WebSocketManager.py
511 512 513 514 515 | |
create_pool(pool_id)
¶
Create a standalone connection pool.
Source code in toolboxv2/mods/WebSocketManager.py
517 518 519 520 521 | |
create_server(host='localhost', port=8765, non_blocking=False)
async
¶
Create and start a WebSocket server.
Source code in toolboxv2/mods/WebSocketManager.py
499 500 501 502 503 504 505 506 507 508 509 | |
get_client(client_id)
¶
Get a client by ID.
Source code in toolboxv2/mods/WebSocketManager.py
615 616 617 | |
get_server_pool(pool_id)
¶
Get a server pool by ID.
Source code in toolboxv2/mods/WebSocketManager.py
611 612 613 | |
get_statistics()
¶
Get comprehensive statistics.
Source code in toolboxv2/mods/WebSocketManager.py
546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 | |
health_check()
async
¶
Perform comprehensive health check.
Source code in toolboxv2/mods/WebSocketManager.py
580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 | |
list_pools()
¶
List all connection pools with stats.
Source code in toolboxv2/mods/WebSocketManager.py
523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 | |
on_exit()
async
¶
Cleanup on exit.
Source code in toolboxv2/mods/WebSocketManager.py
481 482 483 484 485 486 487 488 489 490 491 492 493 | |
on_start()
¶
Initialize the WebSocketManager.
Source code in toolboxv2/mods/WebSocketManager.py
477 478 479 | |
show_version()
¶
Show current version.
Source code in toolboxv2/mods/WebSocketManager.py
495 496 497 | |
WebSocketClient
¶
Robust WebSocket client with automatic reconnection.
Source code in toolboxv2/mods/WebSocketManager.py
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | |
connect(server_url, timeout=30.0)
async
¶
Connect to WebSocket server.
Source code in toolboxv2/mods/WebSocketManager.py
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | |
disconnect()
async
¶
Gracefully disconnect.
Source code in toolboxv2/mods/WebSocketManager.py
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | |
register_handler(event, handler)
¶
Register a message handler for specific events.
Source code in toolboxv2/mods/WebSocketManager.py
244 245 246 247 | |
send_message(event, data)
async
¶
Send a message to the server.
Source code in toolboxv2/mods/WebSocketManager.py
249 250 251 252 253 254 255 256 257 258 259 260 261 262 | |
WebSocketPool
¶
Manages a pool of WebSocket connections with actions and message routing.
Source code in toolboxv2/mods/WebSocketManager.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | |
add_connection(connection_id, websocket)
async
¶
Add a WebSocket connection to the pool.
Source code in toolboxv2/mods/WebSocketManager.py
68 69 70 71 | |
broadcast(message, exclude_connection=None)
async
¶
Broadcast message to all connections in the pool.
Source code in toolboxv2/mods/WebSocketManager.py
131 132 133 134 135 136 137 138 139 140 141 142 | |
close_all()
async
¶
Close all connections in the pool.
Source code in toolboxv2/mods/WebSocketManager.py
163 164 165 166 167 168 169 170 | |
get_connection_count()
¶
Get number of active connections.
Source code in toolboxv2/mods/WebSocketManager.py
159 160 161 | |
get_connection_ids()
¶
Get list of all connection IDs.
Source code in toolboxv2/mods/WebSocketManager.py
155 156 157 | |
handle_message(connection_id, message)
async
¶
Route incoming messages to appropriate handlers.
Source code in toolboxv2/mods/WebSocketManager.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | |
register_action(action_name, handler, connection_ids=None)
¶
Register an action handler for specific connections or globally.
Source code in toolboxv2/mods/WebSocketManager.py
79 80 81 82 83 84 85 86 87 88 89 90 | |
remove_connection(connection_id)
async
¶
Remove a WebSocket connection from the pool.
Source code in toolboxv2/mods/WebSocketManager.py
73 74 75 76 77 | |
send_to_connection(connection_id, message)
async
¶
Send message to a specific connection.
Source code in toolboxv2/mods/WebSocketManager.py
144 145 146 147 148 149 150 151 152 153 | |
WebSocketServer
¶
WebSocket server with pool management.
Source code in toolboxv2/mods/WebSocketManager.py
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 | |
create_pool(pool_id)
¶
Create a new connection pool.
Source code in toolboxv2/mods/WebSocketManager.py
364 365 366 367 368 369 | |
get_pool(pool_id)
¶
Get an existing pool.
Source code in toolboxv2/mods/WebSocketManager.py
371 372 373 | |
handle_connection(websocket, path)
async
¶
Handle new WebSocket connections.
Source code in toolboxv2/mods/WebSocketManager.py
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 | |
start(non_blocking=False)
async
¶
Start the WebSocket server.
Source code in toolboxv2/mods/WebSocketManager.py
410 411 412 413 414 415 416 417 418 | |
stop()
async
¶
Stop the server and close all connections.
Source code in toolboxv2/mods/WebSocketManager.py
420 421 422 423 424 425 426 427 428 429 430 431 | |
WhatsAppTb
¶
client
¶
DocumentSystem
¶
Source code in toolboxv2/mods/WhatsAppTb/client.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | |
delete_document(blob_id)
¶
Delete a document
Source code in toolboxv2/mods/WhatsAppTb/client.py
112 113 114 115 116 117 118 119 | |
list_documents(filter_type=None)
¶
List all documents with metadata
Source code in toolboxv2/mods/WhatsAppTb/client.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | |
save_document(file_data, filename, file_type)
¶
Save a document with metadata
Source code in toolboxv2/mods/WhatsAppTb/client.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | |
search_documents(query)
¶
Search documents by filename or content
Source code in toolboxv2/mods/WhatsAppTb/client.py
121 122 123 124 125 126 127 | |
WhatsAppAssistant
dataclass
¶
Source code in toolboxv2/mods/WhatsAppTb/client.py
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 | |
agent_task(message)
async
¶
Initiate email search workflow
Source code in toolboxv2/mods/WhatsAppTb/client.py
757 758 759 760 761 762 763 764 765 766 767 | |
check_emails(message, query='')
async
¶
Improved email checking with WhatsApp API formatting
Source code in toolboxv2/mods/WhatsAppTb/client.py
769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 | |
complete_authorization(message)
¶
Complete the authorization process using the authorization code
:param authorization_code: Authorization code received from Google
Source code in toolboxv2/mods/WhatsAppTb/client.py
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | |
delete_document(message)
async
¶
Delete document workflow
Source code in toolboxv2/mods/WhatsAppTb/client.py
1426 1427 1428 1429 1430 1431 1432 1433 1434 | |
email_search(message)
async
¶
Initiate email search workflow
Source code in toolboxv2/mods/WhatsAppTb/client.py
876 877 878 879 880 881 882 883 884 885 886 | |
email_summary(message)
async
¶
Generate AI-powered email summaries
Source code in toolboxv2/mods/WhatsAppTb/client.py
849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 | |
find_time_slot(message)
async
¶
Find and display the next 5 available time slots with dynamic durations
Source code in toolboxv2/mods/WhatsAppTb/client.py
1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 | |
generate_authorization_url(*a)
async
¶
Generate an authorization URL for user consent
:return: Authorization URL for the user to click and authorize access
Source code in toolboxv2/mods/WhatsAppTb/client.py
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | |
get_email_details(email_id)
async
¶
Retrieve and format full email details
Source code in toolboxv2/mods/WhatsAppTb/client.py
817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 | |
get_event_details(event_id)
async
¶
Retrieve and format calendar event details with location support
Source code in toolboxv2/mods/WhatsAppTb/client.py
1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 | |
handle_audio_message(message)
async
¶
Process audio messages with STT and TTS
Source code in toolboxv2/mods/WhatsAppTb/client.py
541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |
handle_button_interaction(content, message)
async
¶
Handle button click interactions
Source code in toolboxv2/mods/WhatsAppTb/client.py
607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 | |
handle_calendar_actions(message)
async
¶
Handle calendar-related pending actions
Source code in toolboxv2/mods/WhatsAppTb/client.py
1193 1194 1195 1196 1197 1198 1199 1200 | |
handle_email_actions(message)
async
¶
Handle multi-step email workflows
Source code in toolboxv2/mods/WhatsAppTb/client.py
901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 | |
handle_interactive(message)
async
¶
Handle all interactive messages
Source code in toolboxv2/mods/WhatsAppTb/client.py
533 534 535 536 537 538 539 | |
handle_media_message(message)
async
¶
Handle document/image/video uploads
Source code in toolboxv2/mods/WhatsAppTb/client.py
1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 | |
handle_message(message)
async
¶
Main message handler for incoming WhatsApp messages
Source code in toolboxv2/mods/WhatsAppTb/client.py
456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 | |
init_services()
¶
Initialize Gmail and Calendar services
Source code in toolboxv2/mods/WhatsAppTb/client.py
281 282 283 284 285 286 287 288 289 | |
load_credentials()
¶
Load previously saved credentials if available
:return: Whether credentials were successfully loaded
Source code in toolboxv2/mods/WhatsAppTb/client.py
267 268 269 270 271 272 273 274 275 276 277 278 | |
run()
¶
Start the WhatsApp assistant
Source code in toolboxv2/mods/WhatsAppTb/client.py
1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 | |
save_credentials()
¶
Save the obtained credentials to a file for future use
Source code in toolboxv2/mods/WhatsAppTb/client.py
256 257 258 259 260 261 262 263 264 | |
search_documents(message)
async
¶
Initiate document search workflow
Source code in toolboxv2/mods/WhatsAppTb/client.py
1377 1378 1379 1380 1381 1382 1383 1384 | |
send_email(to, subject, body)
¶
Actual email sending function to be called by agent
Source code in toolboxv2/mods/WhatsAppTb/client.py
1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 | |
send_structured_response(result)
¶
Send complex responses using appropriate WhatsApp features
Source code in toolboxv2/mods/WhatsAppTb/client.py
697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 | |
setup_interaction_buttons()
¶
Define WhatsApp interaction buttons for different functionalities
Source code in toolboxv2/mods/WhatsAppTb/client.py
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 | |
setup_progress_messengers()
¶
Initialize progress messengers for different types of tasks
Source code in toolboxv2/mods/WhatsAppTb/client.py
291 292 293 294 295 296 297 | |
show_task_stack(*a)
async
¶
Display current task stack
Source code in toolboxv2/mods/WhatsAppTb/client.py
1504 1505 1506 1507 1508 1509 | |
show_today_events(message)
async
¶
Show today's calendar events
Source code in toolboxv2/mods/WhatsAppTb/client.py
1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 | |
show_upcoming_events(message)
async
¶
Show upcoming events with interactive support
Source code in toolboxv2/mods/WhatsAppTb/client.py
1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 | |
start_agent(*a)
async
¶
Start the agent in background mode
Source code in toolboxv2/mods/WhatsAppTb/client.py
1490 1491 1492 1493 1494 1495 | |
start_document_upload(message)
async
¶
Initiate document upload workflow
Source code in toolboxv2/mods/WhatsAppTb/client.py
1368 1369 1370 1371 1372 1373 1374 1375 | |
start_email_compose(message)
async
¶
Enhanced email composition workflow
Source code in toolboxv2/mods/WhatsAppTb/client.py
888 889 890 891 892 893 894 895 896 897 898 899 | |
start_event_create(message)
async
¶
Initiate event creation workflow
Source code in toolboxv2/mods/WhatsAppTb/client.py
1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 | |
stop_agent(*b)
async
¶
Stop the currently running agent
Source code in toolboxv2/mods/WhatsAppTb/client.py
1497 1498 1499 1500 1501 1502 | |
system_task(message)
async
¶
Initiate email search workflow
Source code in toolboxv2/mods/WhatsAppTb/client.py
745 746 747 748 749 750 751 752 753 754 755 | |
server
¶
AppManager
¶
Source code in toolboxv2/mods/WhatsAppTb/server.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 | |
add_instance(instance_id, **kwargs)
¶
Add a new app instance to the manager with automatic port assignment.
Source code in toolboxv2/mods/WhatsAppTb/server.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | |
add_update_instance(instance_id, token, phone_key, phone_number)
¶
Add or update instance configuration
Source code in toolboxv2/mods/WhatsAppTb/server.py
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 | |
create_manager_ui(start_assistant)
¶
Enhanced WhatsApp Manager UI with instance configuration controls
Source code in toolboxv2/mods/WhatsAppTb/server.py
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 | |
get_next_available_port()
¶
Find the next available port in the range.
Source code in toolboxv2/mods/WhatsAppTb/server.py
78 79 80 81 82 83 84 | |
on_event(instance_id, event)
async
¶
Handle events.
Source code in toolboxv2/mods/WhatsAppTb/server.py
156 157 158 159 160 | |
on_message(instance_id, message)
async
¶
Handle and forward incoming messages.
Source code in toolboxv2/mods/WhatsAppTb/server.py
150 151 152 153 154 | |
on_verification(instance_id, verification)
async
¶
Handle verification events.
Source code in toolboxv2/mods/WhatsAppTb/server.py
162 163 164 | |
restart_instance(instance_id)
¶
Safe restart of instance
Source code in toolboxv2/mods/WhatsAppTb/server.py
327 328 329 330 | |
run_all_instances()
¶
Start all instances in separate daemon threads.
Source code in toolboxv2/mods/WhatsAppTb/server.py
166 167 168 169 170 171 172 173 174 175 176 177 178 179 | |
run_instance(instance_id)
¶
Run a single instance in a separate thread with error handling and automatic restart.
Source code in toolboxv2/mods/WhatsAppTb/server.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | |
signal_handler(signum, frame)
¶
Handle shutdown signals gracefully.
Source code in toolboxv2/mods/WhatsAppTb/server.py
181 182 183 184 185 | |
start_instance(instance_id)
¶
Start instance thread
Source code in toolboxv2/mods/WhatsAppTb/server.py
339 340 341 342 343 344 345 346 347 348 349 350 | |
stop_all_instances()
¶
Stop all running instances gracefully.
Source code in toolboxv2/mods/WhatsAppTb/server.py
187 188 189 190 191 192 193 | |
stop_instance(instance_id)
¶
Graceful stop of instance
Source code in toolboxv2/mods/WhatsAppTb/server.py
332 333 334 335 336 337 | |
update_instance_config(instance_id, new_key, new_number)
¶
Update existing instance configuration
Source code in toolboxv2/mods/WhatsAppTb/server.py
318 319 320 321 322 323 324 325 | |
utils
¶
ProgressMessenger
¶
Source code in toolboxv2/mods/WhatsAppTb/utils.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | |
send_initial_message(mode='progress')
¶
Sends the initial message. Modes can be 'progress' or 'loading'.
Source code in toolboxv2/mods/WhatsAppTb/utils.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | |
start_loading_in_background(stop_flag)
¶
Starts the loading update in a separate thread.
Source code in toolboxv2/mods/WhatsAppTb/utils.py
97 98 99 100 101 | |
start_progress_in_background(step_flag)
¶
Starts the progress update in a separate thread.
Source code in toolboxv2/mods/WhatsAppTb/utils.py
91 92 93 94 95 | |
update_loading(stop_flag)
¶
Continuously updates the reaction to represent a looping 'loading' indicator.
Source code in toolboxv2/mods/WhatsAppTb/utils.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | |
update_progress(step_flag)
¶
Updates the reaction on the message to represent progress.
Source code in toolboxv2/mods/WhatsAppTb/utils.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | |
cli_functions
¶
replace_bracketed_content(text, replacements, inlist=False)
¶
Ersetzt Inhalte in eckigen Klammern mit entsprechenden Werten aus einem Wörterbuch.
:param text: Der zu verarbeitende Text als String. :param replacements: Ein Wörterbuch mit Schlüssel-Wert-Paaren für die Ersetzung. :return: Den modifizierten Text.
Source code in toolboxv2/mods/cli_functions.py
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | |
helper
¶
create_invitation(app, username)
¶
Creates a one-time invitation code for a user to link a new device.
Source code in toolboxv2/mods/helper.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | |
create_user(app, username, email)
¶
Creates a new user with a generated key pair.
Source code in toolboxv2/mods/helper.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |
delete_user_cli(app, username)
¶
Deletes a user and all their associated data.
Source code in toolboxv2/mods/helper.py
85 86 87 88 89 90 91 92 93 94 95 96 | |
init_system(app)
async
¶
Initializes the ToolBoxV2 system by creating the first administrative user. This is an interactive command.
Source code in toolboxv2/mods/helper.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |
list_users_cli(app)
¶
Lists all registered users.
Source code in toolboxv2/mods/helper.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | |
send_magic_link(app, username)
¶
Sends a magic login link to the user's registered email address.
Source code in toolboxv2/mods/helper.py
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | |
isaa
¶
CodingAgent
¶
live
¶
AsyncCodeDetector
¶
Bases: NodeVisitor
Detect async code and top-level await
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 | |
CargoRustInterface
¶
Usage :
Create interface¶
cargo_interface = CargoRustInterface()
Set up new project¶
await cargo_interface.setup_project("hello_rust")
Add a dependency¶
await cargo_interface.add_dependency("serde", "1.0")
Write and run some code¶
code = """ fn main() { println!("Hello, Rust!"); } """ result = await cargo_interface.run_code(code)
Modify code¶
new_function = """ fn main() { println!("Modified Hello, Rust!"); } """ await cargo_interface.modify_code(new_function, "main()")
Build and test¶
await cargo_interface.build() await cargo_interface.test()
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 | |
__init__(session_dir=None, auto_remove=True)
¶Initialize the Rust/Cargo interface
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
65 66 67 68 69 70 71 72 73 | |
add_dependency(name, version=None)
async
¶Add a dependency to Cargo.toml
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | |
build(release=False)
async
¶Build the project
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | |
load_session(name)
¶Load saved session state
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
257 258 259 260 261 262 263 264 | |
modify_code(code, object_name, file='src/main.rs')
async
¶Modify existing Rust code
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 | |
reset()
¶Reset the interface state
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
75 76 77 78 79 80 81 | |
run_code(code)
async
¶Run Rust code
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | |
save_session(name)
¶Save current session state
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
246 247 248 249 250 251 252 253 254 255 | |
setup_project(name)
async
¶Set up a new Cargo project
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | |
test()
async
¶Run project tests
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | |
MockIPython
¶
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 | |
__str__()
¶String representation of current session
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 | |
get_namespace()
¶Get current namespace
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
672 673 674 | |
load_session(name)
¶Load session with UTF-8 encoding
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 | |
modify_code(code=None, object_name=None, file=None)
async
¶Modify existing code in memory (user namespace) and optionally in the corresponding file.
This method updates variables, functions, or methods in the current Python session and can
also update the corresponding source file if specified.
Args:
code: New value or implementation for the object
object_name: Name of the object to modify (variable, function, or method)
file: Path to the file to update (if None, only updates in memory)
Returns:
String describing the modification result
Examples:
# 1. Update a variable in memory
await ipython.modify_code(code="5", object_name="x")
2. Change a method implementation¶
await ipython.modify_code( code='"""def sound(self): return "Woof""""', object_name="Dog.sound" )
3. Modify a function¶
await ipython.modify_code( code='"""def calculate_age(): return 25"""', object_name="calculate_age" )
4. Update variable in memory and file¶
await ipython.modify_code( code="100", object_name="MAX_SIZE", file="config.py" )
5. Modifying an attribute in init¶
await ipython.modify_code( code='"""def init(self): self.name = "Buddy""""', object_name="Dog.init" )
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 | |
reset()
¶Reset the interpreter state
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 | |
run_cell(code, live_output=True)
async
¶Async version of run_cell that handles both sync and async code
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 | |
save_session(name)
¶Save session with UTF-8 encoding
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 | |
set_base_directory(path)
¶Set the base directory for the virtual file system and add it to sys.path for imports.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
New base directory path |
required |
Returns:
| Type | Description |
|---|---|
str
|
Success message |
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 | |
update_namespace(variables)
¶Update namespace with new variables
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
676 677 678 | |
ParentNodeTransformer
¶
Bases: NodeTransformer
Add parent references to AST nodes
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
491 492 493 494 495 496 | |
SyncReport
dataclass
¶
Report of variables synced from namespace to pipeline
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 | |
TeeStream
¶
Stream that writes to both console and buffer
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
475 476 477 478 479 480 481 482 483 484 485 486 487 488 | |
ToolsInterface
¶
Minimalistic tools interface for LLMs providing code execution, virtual file system, and browser interaction capabilities.
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 | |
__init__(session_dir=None, auto_remove=True, variables=None, variable_manager=None)
¶Initialize the tools interface.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session_dir
|
str | None
|
Directory for session storage |
None
|
auto_remove
|
bool
|
Whether to auto-remove temporary files |
True
|
variables
|
dict[str, Any] | None
|
Initial variables dictionary |
None
|
variable_manager
|
Any | None
|
External variable manager instance |
None
|
web_llm
|
LLM model for web interactions |
required |
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 | |
clear_session()
async
¶Clear the current session (variables, history, files).
Returns:
| Type | Description |
|---|---|
str
|
Success message |
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 | |
create_directory(dirpath)
async
¶Create a new directory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dirpath
|
str
|
Path of directory to create |
required |
Returns:
| Type | Description |
|---|---|
str
|
Success message |
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 | |
execute_python(code)
async
¶Execute Python code in the virtual environment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
code
|
str
|
Python code to execute |
required |
Returns:
| Type | Description |
|---|---|
str
|
Execution result as string |
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 | |
execute_rust(code)
async
¶Execute Rust code using Cargo.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
code
|
str
|
Rust code to execute |
required |
Returns:
| Type | Description |
|---|---|
str
|
Execution result as string |
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 | |
get_execution_history()
async
¶Get the execution history.
Returns:
| Type | Description |
|---|---|
str
|
Execution history as formatted string |
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 | |
get_tools(name=None)
¶Get all available tools as list of tuples (function, name, description).
Returns:
| Type | Description |
|---|---|
list[tuple[Any, str, str]]
|
List of tool tuples |
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 | |
get_variables()
async
¶Get current variables in JSON format.
Returns:
| Type | Description |
|---|---|
str
|
Variables as JSON string |
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 | |
install_package(package_name, version=None)
async
¶Install a Python package in the virtual environment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
package_name
|
str
|
Name of the package to install |
required |
version
|
str | None
|
Optional specific version to install |
None
|
Returns:
| Type | Description |
|---|---|
str
|
Installation result |
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 | |
list_directory(dirpath='.')
async
¶List contents of a directory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dirpath
|
str
|
Directory path to list |
'.'
|
Returns:
| Type | Description |
|---|---|
str
|
Directory listing as string |
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 | |
list_files(dirpath='.')
async
¶List files in a directory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dirpath
|
str
|
Directory path to list |
'.'
|
Returns:
| Type | Description |
|---|---|
str
|
File listing as string |
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 | |
read_file(filepath, lines='')
async
¶Read content from a file in the virtual file system.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filepath
|
str
|
Path to the file |
required |
lines
|
str
|
Optional line range to read (e.g., "1-3" for lines 1 to 3) |
''
|
Returns:
| Type | Description |
|---|---|
str
|
File content or error message |
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 | |
replace_in_file(filepath, old_content, new_content, precise=True)
async
¶Replace exact content in file with new content.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filepath
|
str
|
Path to the file |
required |
old_content
|
str
|
Exact content to replace (empty string for insertion at start) |
required |
new_content
|
str
|
Content to replace with |
required |
precise
|
bool
|
If True, requires exact match; if False, allows single occurrence replacement |
True
|
Returns:
| Type | Description |
|---|---|
str
|
Success message or error |
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 | |
set_base_directory(path)
¶Set the base directory for the virtual file system.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
New base directory path |
required |
Returns:
| Type | Description |
|---|---|
str
|
Success message |
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 | |
set_current_file(filepath)
async
¶Set the current file for Python execution context.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filepath
|
str
|
Path to set as current file |
required |
Returns:
| Type | Description |
|---|---|
str
|
Success message |
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 | |
write_file(filepath, content, lines='')
async
¶Write content to a file in the virtual file system.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filepath
|
str
|
Path to the file |
required |
content
|
str
|
Content to write |
required |
lines
|
str
|
Optional line range to write (e.g., "1-3" for lines 1 to 3) |
''
|
Returns:
| Type | Description |
|---|---|
str
|
Success message |
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 | |
VirtualEnvContext
¶
Context manager for temporary virtual environment activation
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 | |
VirtualFileSystem
¶
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | |
change_directory(dirpath)
¶Change current working directory
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
367 368 369 370 371 372 | |
create_directory(dirpath)
¶Create a new directory
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
347 348 349 350 351 | |
delete_file(filepath)
¶Delete a virtual file
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
336 337 338 339 340 341 342 343 344 345 | |
ifile_exists(filepath)
¶Check if a file exists
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
274 275 276 277 | |
list_directory(dirpath='.')
¶List contents of a directory
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
360 361 362 363 364 365 | |
list_files(dirpath='.')
¶List files in a directory
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
353 354 355 356 357 358 | |
load_state(state_file)
¶Load virtual filesystem state from disk
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
392 393 394 395 396 397 398 399 400 | |
overwrite_lines(filepath, new_content, lines='')
¶Overwrite lines in a file
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
279 280 281 282 283 284 285 286 287 288 289 290 291 292 | |
print_file_structure(start_path='.', indent='')
¶Print the file structure starting from the given path
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
402 403 404 405 406 407 408 409 410 411 412 413 414 415 | |
read_file(filepath)
¶Read content from a virtual file using UTF-8
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | |
save_state(state_file)
¶Save virtual filesystem state to disk
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
383 384 385 386 387 388 389 390 | |
write_file(filepath, content)
¶Write content to a virtual file and persist to disk using UTF-8
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 | |
auto_install(package_name, install_method='pip', upgrade=False, quiet=False, version=None, extra_args=None)
¶
Enhanced auto-save import with version and extra arguments support
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 | |
sync_globals_to_vars(pipeline, namespace=None, prefix=None, include_types=None, exclude_patterns=None, exclude_private=True, deep_copy=False, only_serializable=False)
¶
Sync global variables or a specific namespace to pipeline variables.
Args:
pipeline: Pipeline instance to sync variables to
namespace: Optional dictionary of variables (defaults to globals())
prefix: Optional prefix for variable names (e.g., 'global_')
include_types: Only include variables of these types
exclude_patterns: List of regex patterns to exclude
exclude_private: Exclude variables starting with underscore
deep_copy: Create deep copies of variables instead of references
only_serializable: Only include variables that can be serialized
Returns:
SyncReport with details about added, skipped and error variables
Usage example:
Basic usage - sync all globals¶
report = sync_globals_to_vars(pipeline)
Sync only numeric types with prefix¶
report = sync_globals_to_vars( pipeline, include_types=[int, float], prefix="global_" )
Sync from specific namespace¶
import numpy as np namespace = {"arr": np.array([1,2,3])} report = sync_globals_to_vars(pipeline, namespace=namespace)
Sync with deep copy and serialization check¶
report = sync_globals_to_vars( pipeline, deep_copy=True, only_serializable=True )
Source code in toolboxv2/mods/isaa/CodingAgent/live.py
1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 | |
base
¶
Agent
¶
agent
¶
AgentCheckpoint
dataclass
¶Enhanced AgentCheckpoint with UnifiedContextManager and ChatSession integration
Source code in toolboxv2/mods/isaa/base/Agent/types.py
552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 | |
get_checkpoint_summary()
¶Get human-readable checkpoint summary
Source code in toolboxv2/mods/isaa/base/Agent/types.py
575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 | |
get_storage_size_estimate()
¶Estimate storage size of different checkpoint components
Source code in toolboxv2/mods/isaa/base/Agent/types.py
615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 | |
get_version_info()
¶Get checkpoint version information
Source code in toolboxv2/mods/isaa/base/Agent/types.py
699 700 701 702 703 704 705 706 707 708 | |
validate_checkpoint_integrity()
¶Validate checkpoint integrity and completeness
Source code in toolboxv2/mods/isaa/base/Agent/types.py
640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 | |
AgentModelData
¶
Bases: BaseModel
Source code in toolboxv2/mods/isaa/base/Agent/types.py
768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 | |
get_system_message_with_persona()
¶Get system message with persona integration
Source code in toolboxv2/mods/isaa/base/Agent/types.py
783 784 785 786 787 788 789 790 791 792 | |
BindingSyncHandler
¶Handles automatic synchronization between bound agents
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
11783 11784 11785 11786 11787 11788 11789 11790 11791 11792 11793 11794 | |
cleanup()
¶Clean up sync handler resources
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
11791 11792 11793 11794 | |
ChainMetadata
dataclass
¶Metadata for stored chains
Source code in toolboxv2/mods/isaa/base/Agent/types.py
808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 | |
CompletionCheckerNode
¶
Bases: AsyncNode
Breaks infinite cycles by checking actual completion status
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 | |
ContextAggregatorNode
¶
Bases: AsyncNode
Vereinfachte Context-Aggregation über UnifiedContextManager
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 | |
exec_async(prep_res)
async
¶VEREINFACHT: Get aggregated context from UnifiedContextManager
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 | |
post_async(shared, prep_res, exec_res)
async
¶Store aggregated context for downstream nodes
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 | |
prep_async(shared)
async
¶Simplified preparation - delegate to UnifiedContextManager
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 | |
DecisionTask
dataclass
¶
Bases: Task
Task für dynamisches Routing
Source code in toolboxv2/mods/isaa/base/Agent/types.py
498 499 500 501 502 503 | |
FlowAgent
¶Production-ready agent system built on PocketFlow
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10135 10136 10137 10138 10139 10140 10141 10142 10143 10144 10145 10146 10147 10148 10149 10150 10151 10152 10153 10154 10155 10156 10157 10158 10159 10160 10161 10162 10163 10164 10165 10166 10167 10168 10169 10170 10171 10172 10173 10174 10175 10176 10177 10178 10179 10180 10181 10182 10183 10184 10185 10186 10187 10188 10189 10190 10191 10192 10193 10194 10195 10196 10197 10198 10199 10200 10201 10202 10203 10204 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 10232 10233 10234 10235 10236 10237 10238 10239 10240 10241 10242 10243 10244 10245 10246 10247 10248 10249 10250 10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 10278 10279 10280 10281 10282 10283 10284 10285 10286 10287 10288 10289 10290 10291 10292 10293 10294 10295 10296 10297 10298 10299 10300 10301 10302 10303 10304 10305 10306 10307 10308 10309 10310 10311 10312 10313 10314 10315 10316 10317 10318 10319 10320 10321 10322 10323 10324 10325 10326 10327 10328 10329 10330 10331 10332 10333 10334 10335 10336 10337 10338 10339 10340 10341 10342 10343 10344 10345 10346 10347 10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 10388 10389 10390 10391 10392 10393 10394 10395 10396 10397 10398 10399 10400 10401 10402 10403 10404 10405 10406 10407 10408 10409 10410 10411 10412 10413 10414 10415 10416 10417 10418 10419 10420 10421 10422 10423 10424 10425 10426 10427 10428 10429 10430 10431 10432 10433 10434 10435 10436 10437 10438 10439 10440 10441 10442 10443 10444 10445 10446 10447 10448 10449 10450 10451 10452 10453 10454 10455 10456 10457 10458 10459 10460 10461 10462 10463 10464 10465 10466 10467 10468 10469 10470 10471 10472 10473 10474 10475 10476 10477 10478 10479 10480 10481 10482 10483 10484 10485 10486 10487 10488 10489 10490 10491 10492 10493 10494 10495 10496 10497 10498 10499 10500 10501 10502 10503 10504 10505 10506 10507 10508 10509 10510 10511 10512 10513 10514 10515 10516 10517 10518 10519 10520 10521 10522 10523 10524 10525 10526 10527 10528 10529 10530 10531 10532 10533 10534 10535 10536 10537 10538 10539 10540 10541 10542 10543 10544 10545 10546 10547 10548 10549 10550 10551 10552 10553 10554 10555 10556 10557 10558 10559 10560 10561 10562 10563 10564 10565 10566 10567 10568 10569 10570 10571 10572 10573 10574 10575 10576 10577 10578 10579 10580 10581 10582 10583 10584 10585 10586 10587 10588 10589 10590 10591 10592 10593 10594 10595 10596 10597 10598 10599 10600 10601 10602 10603 10604 10605 10606 10607 10608 10609 10610 10611 10612 10613 10614 10615 10616 10617 10618 10619 10620 10621 10622 10623 10624 10625 10626 10627 10628 10629 10630 10631 10632 10633 10634 10635 10636 10637 10638 10639 10640 10641 10642 10643 10644 10645 10646 10647 10648 10649 10650 10651 10652 10653 10654 10655 10656 10657 10658 10659 10660 10661 10662 10663 10664 10665 10666 10667 10668 10669 10670 10671 10672 10673 10674 10675 10676 10677 10678 10679 10680 10681 10682 10683 10684 10685 10686 10687 10688 10689 10690 10691 10692 10693 10694 10695 10696 10697 10698 10699 10700 10701 10702 10703 10704 10705 10706 10707 10708 10709 10710 10711 10712 10713 10714 10715 10716 10717 10718 10719 10720 10721 10722 10723 10724 10725 10726 10727 10728 10729 10730 10731 10732 10733 10734 10735 10736 10737 10738 10739 10740 10741 10742 10743 10744 10745 10746 10747 10748 10749 10750 10751 10752 10753 10754 10755 10756 10757 10758 10759 10760 10761 10762 10763 10764 10765 10766 10767 10768 10769 10770 10771 10772 10773 10774 10775 10776 10777 10778 10779 10780 10781 10782 10783 10784 10785 10786 10787 10788 10789 10790 10791 10792 10793 10794 10795 10796 10797 10798 10799 10800 10801 10802 10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 10867 10868 10869 10870 10871 10872 10873 10874 10875 10876 10877 10878 10879 10880 10881 10882 10883 10884 10885 10886 10887 10888 10889 10890 10891 10892 10893 10894 10895 10896 10897 10898 10899 10900 10901 10902 10903 10904 10905 10906 10907 10908 10909 10910 10911 10912 10913 10914 10915 10916 10917 10918 10919 10920 10921 10922 10923 10924 10925 10926 10927 10928 10929 10930 10931 10932 10933 10934 10935 10936 10937 10938 10939 10940 10941 10942 10943 10944 10945 10946 10947 10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004 11005 11006 11007 11008 11009 11010 11011 11012 11013 11014 11015 11016 11017 11018 11019 11020 11021 11022 11023 11024 11025 11026 11027 11028 11029 11030 11031 11032 11033 11034 11035 11036 11037 11038 11039 11040 11041 11042 11043 11044 11045 11046 11047 11048 11049 11050 11051 11052 11053 11054 11055 11056 11057 11058 11059 11060 11061 11062 11063 11064 11065 11066 11067 11068 11069 11070 11071 11072 11073 11074 11075 11076 11077 11078 11079 11080 11081 11082 11083 11084 11085 11086 11087 11088 11089 11090 11091 11092 11093 11094 11095 11096 11097 11098 11099 11100 11101 11102 11103 11104 11105 11106 11107 11108 11109 11110 11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 11122 11123 11124 11125 11126 11127 11128 11129 11130 11131 11132 11133 11134 11135 11136 11137 11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182 11183 11184 11185 11186 11187 11188 11189 11190 11191 11192 11193 11194 11195 11196 11197 11198 11199 11200 11201 11202 11203 11204 11205 11206 11207 11208 11209 11210 11211 11212 11213 11214 11215 11216 11217 11218 11219 11220 11221 11222 11223 11224 11225 11226 11227 11228 11229 11230 11231 11232 11233 11234 11235 11236 11237 11238 11239 11240 11241 11242 11243 11244 11245 11246 11247 11248 11249 11250 11251 11252 11253 11254 11255 11256 11257 11258 11259 11260 11261 11262 11263 11264 11265 11266 11267 11268 11269 11270 11271 11272 11273 11274 11275 11276 11277 11278 11279 11280 11281 11282 11283 11284 11285 11286 11287 11288 11289 11290 11291 11292 11293 11294 11295 11296 11297 11298 11299 11300 11301 11302 11303 11304 11305 11306 11307 11308 11309 11310 11311 11312 11313 11314 11315 11316 11317 11318 11319 11320 11321 11322 11323 11324 11325 11326 11327 11328 11329 11330 11331 11332 11333 11334 11335 11336 11337 11338 11339 11340 11341 11342 11343 11344 11345 11346 11347 11348 11349 11350 11351 11352 11353 11354 11355 11356 11357 11358 11359 11360 11361 11362 11363 11364 11365 11366 11367 11368 11369 11370 11371 11372 11373 11374 11375 11376 11377 11378 11379 11380 11381 11382 11383 11384 11385 11386 11387 11388 11389 11390 11391 11392 11393 11394 11395 11396 11397 11398 11399 11400 11401 11402 11403 11404 11405 11406 11407 11408 11409 11410 11411 11412 11413 11414 11415 11416 11417 11418 11419 11420 11421 11422 11423 11424 11425 11426 11427 11428 11429 11430 11431 11432 11433 11434 11435 11436 11437 11438 11439 11440 11441 11442 11443 11444 11445 11446 11447 11448 11449 11450 11451 11452 11453 11454 11455 11456 11457 11458 11459 11460 11461 11462 11463 11464 11465 11466 11467 11468 11469 11470 11471 11472 11473 11474 11475 11476 11477 11478 11479 11480 11481 11482 11483 11484 11485 11486 11487 11488 11489 11490 11491 11492 11493 11494 11495 11496 11497 11498 11499 11500 11501 11502 11503 11504 11505 11506 11507 11508 11509 11510 11511 11512 11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11526 11527 11528 11529 11530 11531 11532 11533 11534 11535 11536 11537 11538 11539 11540 11541 11542 11543 11544 11545 11546 11547 11548 11549 11550 11551 11552 11553 11554 11555 11556 11557 11558 11559 11560 11561 11562 11563 11564 11565 11566 11567 11568 11569 11570 11571 11572 11573 11574 11575 11576 11577 11578 11579 11580 11581 11582 11583 11584 11585 11586 11587 11588 11589 11590 11591 11592 11593 11594 11595 11596 11597 11598 11599 11600 11601 11602 11603 11604 11605 11606 11607 11608 11609 11610 11611 11612 11613 11614 11615 11616 11617 11618 11619 11620 11621 11622 11623 11624 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 11643 11644 11645 11646 11647 11648 11649 11650 11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 11667 11668 11669 11670 11671 11672 11673 11674 11675 11676 11677 11678 11679 11680 11681 11682 11683 11684 11685 11686 11687 11688 11689 11690 | |
total_cost
property
¶Get total cost if budget manager available
__mod__(other)
¶Implements % operator for conditional branching
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
11458 11459 11460 | |
a_format_class(pydantic_model, prompt, message_context=None, max_retries=2, auto_context=True, session_id=None, **kwargs)
async
¶State-of-the-art LLM-based structured data formatting using Pydantic models.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pydantic_model
|
type[BaseModel]
|
The Pydantic model class to structure the response |
required |
prompt
|
str
|
The main prompt for the LLM |
required |
message_context
|
list[dict]
|
Optional conversation context messages |
None
|
max_retries
|
int
|
Maximum number of retry attempts |
2
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
Validated structured data matching the Pydantic model |
Raises:
| Type | Description |
|---|---|
ValidationError
|
If the LLM response cannot be validated against the model |
RuntimeError
|
If all retry attempts fail |
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
10298 10299 10300 10301 10302 10303 10304 10305 10306 10307 10308 10309 10310 10311 10312 10313 10314 10315 10316 10317 10318 10319 10320 10321 10322 10323 10324 10325 10326 10327 10328 10329 10330 10331 10332 10333 10334 10335 10336 10337 10338 10339 10340 10341 10342 10343 10344 10345 10346 10347 10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 10388 10389 10390 10391 10392 10393 10394 10395 10396 10397 10398 10399 10400 10401 10402 10403 10404 10405 10406 10407 10408 10409 10410 10411 10412 10413 10414 10415 10416 10417 10418 10419 10420 10421 10422 10423 10424 10425 10426 10427 10428 10429 10430 10431 10432 10433 10434 10435 10436 10437 | |
a_run(query, session_id='default', user_id=None, stream_callback=None, remember=True, **kwargs)
async
¶Main entry point für Agent-Ausführung mit UnifiedContextManager
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 | |
a_run_with_format(query, response_format='frei-text', text_length='chat-conversation', custom_instructions='', **kwargs)
async
¶Führe Agent mit spezifischem Format aus
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 | |
add_custom_flow(flow, name)
¶Add a custom flow for dynamic execution
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
10241 10242 10243 10244 | |
add_first_class_tool(tool_func, name, description)
¶Add a first-class meta-tool that can be used by the LLMReasonerNode. These are different from regular tools - they control agent sub-systems.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tool_func
|
Callable
|
The function to register as a meta-tool |
required |
name
|
str
|
Name of the meta-tool |
required |
description
|
str
|
Description of when and how to use it |
required |
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 | |
add_tool(tool_func, name=None, description=None, is_new=False)
async
¶Enhanced tool addition with intelligent analysis
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 | |
arun_function(function_name, *args, **kwargs)
async
¶Asynchronously finds a function by its string name, executes it with the given arguments, and returns the result.
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
10250 10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 10278 10279 10280 10281 10282 10283 10284 10285 10286 10287 10288 10289 10290 10291 10292 10293 10294 | |
bind(*agents, shared_scopes=None, auto_sync=True)
¶Bind two or more agents together with shared and private variable spaces.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
*agents
|
FlowAgent instances to bind together |
()
|
|
shared_scopes
|
list[str]
|
List of scope names to share (default: ['world', 'results', 'system']) |
None
|
auto_sync
|
bool
|
Whether to automatically sync variables and context |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
Binding configuration with agent references |
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
11462 11463 11464 11465 11466 11467 11468 11469 11470 11471 11472 11473 11474 11475 11476 11477 11478 11479 11480 11481 11482 11483 11484 11485 11486 11487 11488 11489 11490 11491 11492 11493 11494 11495 11496 11497 11498 11499 11500 11501 11502 11503 11504 11505 11506 11507 11508 11509 11510 11511 11512 11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11526 11527 11528 11529 11530 11531 11532 11533 11534 11535 11536 11537 11538 11539 11540 11541 11542 11543 11544 11545 11546 11547 11548 11549 11550 11551 11552 11553 11554 11555 11556 11557 11558 11559 11560 11561 11562 11563 11564 11565 11566 11567 11568 11569 11570 11571 11572 11573 11574 11575 11576 11577 11578 11579 11580 11581 11582 11583 11584 11585 11586 11587 11588 11589 11590 | |
clean_memory(deep_clean=False)
async
¶Clean memory and context of the agent
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
10642 10643 10644 10645 10646 10647 10648 10649 10650 10651 10652 10653 10654 10655 10656 10657 10658 10659 10660 10661 10662 10663 10664 10665 10666 10667 10668 10669 10670 10671 10672 10673 10674 10675 10676 10677 10678 10679 10680 10681 10682 10683 10684 10685 10686 10687 10688 10689 10690 10691 10692 10693 10694 10695 10696 10697 10698 10699 10700 10701 10702 10703 10704 10705 10706 10707 10708 10709 10710 10711 10712 | |
cleanup_session_context(session_id=None, keep_count=100, remove_old_snapshots=True)
async
¶Cleanup session context by removing old snapshots and entries
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 | |
clear_context(session_id=None)
¶Clear context über UnifiedContextManager mit Session-spezifischer Unterstützung
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
10564 10565 10566 10567 10568 10569 10570 10571 10572 10573 10574 10575 10576 10577 10578 10579 10580 10581 10582 10583 10584 10585 10586 10587 10588 10589 10590 10591 10592 10593 10594 10595 10596 10597 10598 10599 10600 10601 10602 10603 10604 10605 10606 10607 10608 10609 10610 10611 10612 10613 10614 10615 10616 10617 10618 10619 10620 10621 10622 10623 10624 10625 10626 10627 10628 10629 10630 10631 10632 10633 10634 10635 10636 10637 10638 10639 10640 | |
close()
async
¶Clean shutdown
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
10714 10715 10716 10717 10718 10719 10720 10721 10722 10723 10724 10725 10726 10727 10728 10729 10730 10731 10732 10733 10734 10735 10736 10737 | |
configure_persona_integration(apply_method='system_prompt', integration_level='light')
¶Configure how persona is applied
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
9008 9009 9010 9011 9012 9013 9014 9015 | |
delete_old_checkpoints(keep_count=5, max_age_hours=168)
async
¶Delete old checkpoints, keeping the most recent ones
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 | |
explain_reasoning_process()
async
¶Erkläre den Reasoning-Prozess des Agenten
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 | |
format_text(text, **context)
¶Format text with variables
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
8798 8799 8800 | |
get_available_formats()
¶Erhalte verfügbare Format- und Längen-Optionen
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 | |
get_available_variables()
¶Get available variables for dynamic formatting
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
9017 9018 9019 | |
get_context(session_id=None, format_for_llm=True)
async
¶ÜBERARBEITET: Get context über UnifiedContextManager statt verteilte Quellen
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 | |
get_context_overview(session_id=None, display=False)
async
¶Detaillierte Übersicht des aktuellen Contexts mit Token-Counts und optionaler Display-Darstellung
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session_id
|
str
|
Session ID für context (default: active_session) |
None
|
display
|
bool
|
Ob die Übersicht im Terminal-Style angezeigt werden soll |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[str, Any]
|
Detaillierte Context-Übersicht mit Raw-Daten und Token-Counts |
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
10746 10747 10748 10749 10750 10751 10752 10753 10754 10755 10756 10757 10758 10759 10760 10761 10762 10763 10764 10765 10766 10767 10768 10769 10770 10771 10772 10773 10774 10775 10776 10777 10778 10779 10780 10781 10782 10783 10784 10785 10786 10787 10788 10789 10790 10791 10792 10793 10794 10795 10796 10797 10798 10799 10800 10801 10802 10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 10867 10868 10869 10870 10871 10872 10873 10874 10875 10876 10877 10878 10879 10880 10881 10882 10883 10884 10885 10886 10887 10888 10889 10890 10891 10892 10893 10894 10895 10896 10897 10898 10899 10900 10901 10902 10903 10904 10905 10906 10907 10908 10909 10910 10911 10912 10913 10914 10915 10916 10917 10918 10919 10920 10921 10922 10923 10924 10925 10926 10927 10928 10929 10930 10931 10932 10933 10934 10935 10936 10937 10938 10939 10940 10941 10942 10943 10944 10945 10946 10947 10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004 11005 11006 11007 11008 11009 11010 11011 11012 11013 11014 11015 11016 11017 11018 11019 11020 11021 11022 11023 11024 11025 11026 | |
get_context_statistics()
¶Get comprehensive context management statistics
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 | |
get_format_quality_report()
¶Erhalte detaillierten Format-Qualitätsbericht
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 | |
get_session_storage_stats()
¶Get comprehensive session storage statistics
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 | |
get_task_execution_summary()
async
¶Erhalte detaillierte Zusammenfassung der Task-Ausführung
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 | |
get_tool_by_name(tool_name)
¶Get tool function by name
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
10246 10247 10248 | |
get_variable(path, default=None)
¶Get variable using unified system
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
8794 8795 8796 | |
get_variable_documentation()
¶Get comprehensive variable system documentation
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 | |
initialize_context_awareness()
async
¶Enhanced context awareness with session management
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 | |
initialize_session_context(session_id='default', max_history=200)
async
¶Vereinfachte Session-Initialisierung über UnifiedContextManager
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 | |
list_available_checkpoints(max_age_hours=168)
¶List all available checkpoints with metadata
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 | |
load_context_from_session(session_id, context_type='full')
async
¶Load context from ChatSession storage
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 | |
load_latest_checkpoint(auto_restore_history=True, max_age_hours=24)
async
¶Vereinfachtes Checkpoint-Laden mit automatischer History-Wiederherstellung
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 | |
pause()
async
¶Pause agent execution
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 | |
resume()
async
¶Resume agent execution
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 | |
save_context_to_file(session_id=None)
async
¶Save current context to file
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 | |
save_context_to_session(session_id=None, context_type='full')
async
¶Save current context to ChatSession for persistent storage
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 | |
set_persona(name, style='professional', tone='friendly', personality_traits=None, apply_method='system_prompt', integration_level='light', custom_instructions='')
¶Set agent persona mit erweiterten Konfigurationsmöglichkeiten
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 | |
set_response_format(response_format, text_length, custom_instructions='', quality_threshold=0.7)
¶Dynamische Format- und Längen-Konfiguration
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 | |
set_variable(path, value)
¶Set variable using unified system
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
8790 8791 8792 | |
setup_a2a_server(host='0.0.0.0', port=5000, **kwargs)
¶Setup A2A server for bidirectional communication
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
10495 10496 10497 10498 10499 10500 10501 10502 10503 10504 10505 10506 10507 10508 10509 10510 10511 10512 10513 10514 10515 10516 10517 10518 10519 10520 10521 10522 10523 10524 10525 | |
setup_mcp_server(host='0.0.0.0', port=8000, name=None, **kwargs)
¶Setup MCP server
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
10527 10528 10529 10530 10531 10532 10533 10534 10535 10536 10537 10538 10539 10540 10541 10542 10543 10544 10545 10546 | |
start_servers()
async
¶Start all configured servers
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
10550 10551 10552 10553 10554 10555 10556 10557 10558 10559 10560 10561 10562 | |
status(pretty_print=False)
async
¶Get comprehensive agent status with optional pretty printing
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
11138 11139 11140 11141 11142 11143 11144 11145 11146 11147 11148 11149 11150 11151 11152 11153 11154 11155 11156 11157 11158 11159 11160 11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 11176 11177 11178 11179 11180 11181 11182 11183 11184 11185 11186 11187 11188 11189 11190 11191 11192 11193 11194 11195 11196 11197 11198 11199 11200 11201 11202 11203 11204 11205 11206 11207 11208 11209 11210 11211 11212 11213 11214 11215 11216 11217 11218 11219 11220 11221 11222 11223 11224 11225 11226 11227 11228 11229 11230 11231 11232 11233 11234 11235 11236 11237 11238 11239 11240 11241 11242 11243 11244 11245 11246 11247 11248 11249 11250 11251 11252 11253 11254 11255 11256 11257 11258 11259 11260 11261 11262 11263 11264 11265 11266 11267 11268 11269 11270 11271 11272 11273 11274 11275 11276 11277 11278 11279 11280 11281 11282 11283 11284 11285 11286 11287 11288 11289 11290 11291 11292 11293 11294 11295 11296 11297 11298 11299 11300 11301 11302 11303 11304 11305 11306 11307 11308 11309 11310 11311 11312 11313 11314 11315 11316 11317 11318 11319 11320 11321 11322 11323 11324 11325 11326 11327 11328 11329 11330 11331 11332 11333 11334 11335 11336 11337 11338 11339 11340 11341 11342 11343 11344 11345 11346 11347 11348 11349 11350 11351 11352 11353 11354 11355 11356 11357 11358 11359 11360 11361 11362 11363 11364 11365 11366 11367 11368 11369 11370 11371 11372 11373 11374 11375 11376 11377 11378 11379 11380 11381 11382 11383 11384 11385 11386 11387 11388 11389 11390 11391 11392 11393 11394 11395 11396 11397 11398 11399 11400 11401 11402 11403 11404 11405 11406 11407 11408 11409 11410 11411 11412 11413 11414 11415 11416 11417 11418 11419 11420 11421 11422 11423 11424 11425 11426 11427 11428 11429 11430 11431 11432 11433 11434 11435 11436 11437 11438 11439 11440 11441 11442 11443 | |
unbind(preserve_shared_data=False)
¶Unbind this agent from any binding configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
preserve_shared_data
|
bool
|
Whether to preserve shared data in the agent after unbinding |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
Unbinding result with statistics |
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
11592 11593 11594 11595 11596 11597 11598 11599 11600 11601 11602 11603 11604 11605 11606 11607 11608 11609 11610 11611 11612 11613 11614 11615 11616 11617 11618 11619 11620 11621 11622 11623 11624 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 11643 11644 11645 11646 11647 11648 11649 11650 11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 11667 11668 11669 11670 11671 11672 11673 11674 11675 11676 11677 11678 11679 11680 11681 11682 11683 11684 11685 11686 11687 11688 11689 11690 | |
FormatConfig
dataclass
¶Konfiguration für Response-Format und -Länge
Source code in toolboxv2/mods/isaa/base/Agent/types.py
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 | |
get_combined_instructions()
¶Kombiniere Format- und Längen-Anweisungen
Source code in toolboxv2/mods/isaa/base/Agent/types.py
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 | |
get_expected_word_range()
¶Erwartete Wortanzahl für Qualitätsbewertung
Source code in toolboxv2/mods/isaa/base/Agent/types.py
416 417 418 419 420 421 422 423 424 425 | |
get_format_instructions()
¶Generiere Format-spezifische Anweisungen
Source code in toolboxv2/mods/isaa/base/Agent/types.py
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 | |
get_length_instructions()
¶Generiere Längen-spezifische Anweisungen
Source code in toolboxv2/mods/isaa/base/Agent/types.py
388 389 390 391 392 393 394 395 396 397 | |
LLMReasonerNode
¶
Bases: AsyncNode
Enhanced strategic reasoning core with outline-driven execution, context management, auto-recovery, and intensive variable system integration.
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 | |
exec_async(prep_res)
async
¶Enhanced main reasoning loop with outline-driven execution
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 | |
post_async(shared, prep_res, exec_res)
async
¶Enhanced post-processing with comprehensive data storage
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 | |
prep_async(shared)
async
¶Enhanced initialization with variable system integration
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 | |
LLMTask
dataclass
¶
Bases: Task
Spezialisierter Task für LLM-Aufrufe
Source code in toolboxv2/mods/isaa/base/Agent/types.py
475 476 477 478 479 480 481 482 483 484 485 | |
LLMToolNode
¶
Bases: AsyncNode
Enhanced LLM tool with automatic tool calling and agent loop integration
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 | |
exec_async(prep_res)
async
¶Main execution with tool calling loop
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 | |
PersonaConfig
dataclass
¶Source code in toolboxv2/mods/isaa/base/Agent/types.py
710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 | |
should_post_process()
¶Check if post-processing should be applied
Source code in toolboxv2/mods/isaa/base/Agent/types.py
764 765 766 | |
to_system_prompt_addition()
¶Convert persona to system prompt addition with format integration
Source code in toolboxv2/mods/isaa/base/Agent/types.py
724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 | |
update_format(response_format, text_length, custom_instructions='')
¶Dynamische Format-Aktualisierung
Source code in toolboxv2/mods/isaa/base/Agent/types.py
745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 | |
PlanData
¶
Bases: BaseModel
Dataclass for plan data
Source code in toolboxv2/mods/isaa/base/Agent/types.py
506 507 508 509 510 511 | |
ProgressEvent
dataclass
¶Enhanced progress event with better error handling
Source code in toolboxv2/mods/isaa/base/Agent/types.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | |
from_dict(data)
classmethod
¶Create ProgressEvent from dictionary
Source code in toolboxv2/mods/isaa/base/Agent/types.py
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | |
get_chat_display_data()
¶Get data optimized for chat view display
Source code in toolboxv2/mods/isaa/base/Agent/types.py
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | |
get_detailed_display_data()
¶Get complete filtered data for detailed popup view
Source code in toolboxv2/mods/isaa/base/Agent/types.py
263 264 265 | |
get_progress_summary()
¶Get a brief summary for progress sidebar
Source code in toolboxv2/mods/isaa/base/Agent/types.py
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | |
to_dict()
¶Return event data with None values removed for compact display
Source code in toolboxv2/mods/isaa/base/Agent/types.py
209 210 211 212 213 214 215 216 217 218 219 220 221 222 | |
ProgressTracker
¶Advanced progress tracking with cost calculation
Source code in toolboxv2/mods/isaa/base/Agent/types.py
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 | |
calculate_llm_cost(model, input_tokens, output_tokens, completion_response=None)
¶Calculate approximate LLM cost
Source code in toolboxv2/mods/isaa/base/Agent/types.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | |
emit_event(event)
async
¶Emit progress event with callback and storage
Source code in toolboxv2/mods/isaa/base/Agent/types.py
299 300 301 302 303 304 305 306 307 308 309 310 311 312 | |
end_timer(key)
¶End timing operation and return duration
Source code in toolboxv2/mods/isaa/base/Agent/types.py
321 322 323 324 325 326 327 | |
get_summary()
¶Get comprehensive progress summary
Source code in toolboxv2/mods/isaa/base/Agent/types.py
347 348 349 350 351 352 353 354 355 356 357 358 359 360 | |
start_timer(key)
¶Start timing operation
Source code in toolboxv2/mods/isaa/base/Agent/types.py
315 316 317 318 319 | |
ResponseFinalProcessorNode
¶
Bases: AsyncNode
Finale Verarbeitung mit Persona-System
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 | |
ResponseFormatterNode
¶
Bases: AsyncNode
Formatiere finale Antwort für Benutzer
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 | |
ResponseGenerationFlow
¶
Bases: AsyncFlow
Intelligente Antwortgenerierung basierend auf Task-Ergebnissen
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 | |
ResponseQualityNode
¶
Bases: AsyncNode
Prüfe Qualität der generierten Antwort
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 | |
ResultSynthesizerNode
¶
Bases: AsyncNode
Synthetisiere finale Antwort aus allen Ergebnissen
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 | |
StateSyncNode
¶
Bases: AsyncNode
Synchronize state between world model and shared store
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 | |
Task
dataclass
¶Source code in toolboxv2/mods/isaa/base/Agent/types.py
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 | |
__post_init__()
¶Ensure all mutable defaults are properly initialized
Source code in toolboxv2/mods/isaa/base/Agent/types.py
449 450 451 452 453 454 455 456 | |
TaskExecutorNode
¶
Bases: AsyncNode
Vollständige Task-Ausführung als unabhängige Node mit LLM-unterstützter Planung
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 | |
exec_async(prep_res)
async
¶Hauptausführungslogik mit intelligentem Routing
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 | |
get_execution_statistics()
¶Erhalte detaillierte Ausführungsstatistiken
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 | |
post_async(shared, prep_res, exec_res)
async
¶Erweiterte Post-Processing mit dynamischer Plan-Anpassung
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 | |
prep_async(shared)
async
¶Enhanced preparation with unified variable system
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 | |
TaskManagementFlow
¶
Bases: AsyncFlow
Enhanced Task-Management-Flow with LLMReasonerNode as strategic core. The flow now starts with strategic reasoning and delegates to specialized sub-systems.
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 | |
run_async(shared)
async
¶Enhanced run with sub-system injection
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 | |
TaskPlannerNode
¶
Bases: AsyncNode
Erweiterte Aufgabenplanung mit dynamischen Referenzen und Tool-Integration
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 | |
post_async(shared, prep_res, exec_res)
async
¶Post-processing nach Plan-Erstellung
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 | |
prep_async(shared)
async
¶Enhanced preparation with goals-based planning support
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 | |
ToolAnalysis
¶
Bases: BaseModel
Defines the structure for a valid tool analysis.
Source code in toolboxv2/mods/isaa/base/Agent/types.py
795 796 797 798 799 800 801 802 803 804 805 | |
ToolTask
dataclass
¶
Bases: Task
Spezialisierter Task für Tool-Aufrufe
Source code in toolboxv2/mods/isaa/base/Agent/types.py
488 489 490 491 492 493 494 495 | |
UnifiedBindingManager
¶Unified manager that handles both shared and private variable scopes for bound agents
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
11692 11693 11694 11695 11696 11697 11698 11699 11700 11701 11702 11703 11704 11705 11706 11707 11708 11709 11710 11711 11712 11713 11714 11715 11716 11717 11718 11719 11720 11721 11722 11723 11724 11725 11726 11727 11728 11729 11730 11731 11732 11733 11734 11735 11736 11737 11738 11739 11740 11741 11742 11743 11744 11745 11746 11747 11748 11749 11750 11751 11752 11753 11754 11755 11756 11757 11758 11759 11760 11761 11762 11763 11764 11765 11766 11767 11768 11769 11770 11771 11772 11773 11774 11775 11776 11777 11778 11779 11780 11781 | |
format_text(text, context=None)
¶Format text with variables from both managers
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
11743 11744 11745 11746 11747 11748 11749 11750 | |
get(path, default=None, use_cache=True)
¶Get variable from appropriate manager (shared or private)
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
11704 11705 11706 11707 11708 11709 11710 11711 11712 11713 11714 11715 | |
get_available_variables()
¶Get available variables from both managers
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
11752 11753 11754 11755 11756 11757 11758 11759 11760 11761 11762 | |
get_scope_info()
¶Get scope information from both managers
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
11764 11765 11766 11767 11768 11769 11770 11771 11772 11773 11774 11775 11776 11777 | |
set(path, value, create_scope=True)
¶Set variable in appropriate manager (shared or private)
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
11717 11718 11719 11720 11721 11722 11723 11724 11725 11726 11727 11728 11729 | |
UnifiedContextManager
¶Zentrale Orchestrierung aller Context-Quellen für einheitlichen und effizienten Datenzugriff. Vereinigt ChatSession, VariableManager, World Model und Task Results.
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 | |
add_interaction(session_id, role, content, metadata=None)
async
¶Einheitlicher Weg um Interaktionen in ChatSession zu speichern
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 | |
build_unified_context(session_id, query=None, context_type='full')
async
¶ZENTRALE Methode für vollständigen Context-Aufbau aus allen Quellen
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 | |
cleanup_old_sessions(max_age_hours=168)
async
¶Cleanup alte Sessions (default: 1 Woche)
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 | |
get_contextual_history(session_id, query='', max_entries=10)
async
¶Intelligente Auswahl relevanter Geschichte aus ChatSession
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 | |
get_formatted_context_for_llm(unified_context)
¶Formatiere unified context für LLM consumption
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 | |
get_session_statistics()
¶Hole Statistiken über alle Sessions
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 | |
initialize_session(session_id, max_history=200)
async
¶Initialisiere oder lade existierende ChatSession als primäre Context-Quelle
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 | |
VariableManager
¶Unified variable management system with advanced features
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 | |
format_text(text, context=None)
¶Enhanced text formatting with multiple syntaxes
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 | |
get(path, default=None, use_cache=True)
¶Get variable with dot notation path support for dicts and lists.
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 | |
get_available_variables()
¶Recursively documents all available variables from world_model and scopes to provide a comprehensive overview for an LLM.
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 | |
get_llm_variable_context()
¶Generates a detailed variable context formatted for LLM consumption, explaining structure, access patterns, and listing all available variables.
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 | |
get_scope_info()
¶Get information about all available scopes
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 | |
get_variable_suggestions(query)
¶Get variable suggestions based on query content
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 | |
register_scope(name, data)
¶Register a new variable scope
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
7210 7211 7212 7213 | |
set(path, value, create_scope=True)
¶Set variable with dot notation path support for dicts and lists.
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 | |
set_results_store(results_store)
¶Set the results store for task result references
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
7215 7216 7217 7218 | |
set_tasks_store(tasks_store)
¶Set tasks store for task metadata access
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
7220 7221 7222 7223 | |
validate_references(text)
¶Validate all variable references in text
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 | |
auto_unescape(args)
¶Automatically unescape all strings in nested data structure.
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
12030 12031 12032 | |
create_task(task_type, **kwargs)
¶Factory für Task-Erstellung mit korrektem Typ
Source code in toolboxv2/mods/isaa/base/Agent/types.py
515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 | |
get_args_schema(func)
¶Generate a string representation of a function's arguments and annotations. Keeps args and *kwargs indicators and handles modern Python type hints.
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
11809 11810 11811 11812 11813 11814 11815 11816 11817 11818 11819 11820 11821 11822 11823 11824 11825 11826 11827 11828 11829 11830 11831 11832 11833 11834 | |
get_progress_summary(self)
¶Get comprehensive progress summary from the agent
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
11797 11798 11799 11800 11801 | |
needs_unescaping(text)
¶Detect if string likely needs unescaping.
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
12007 12008 12009 | |
process_nested(data, max_depth=20)
¶Recursively process nested structures, unescaping strings that need it.
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
12012 12013 12014 12015 12016 12017 12018 12019 12020 12021 12022 12023 12024 12025 12026 12027 | |
unescape_string(text)
¶Universal string unescaping for any programming language.
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
11986 11987 11988 11989 11990 11991 11992 11993 11994 11995 11996 11997 11998 11999 12000 12001 12002 12003 12004 | |
with_progress_tracking(cls)
¶Ein Klassendekorator, der die Methoden run_async, prep_async, exec_async, und exec_fallback_async automatisch mit umfassendem Progress-Tracking umwickelt.
Source code in toolboxv2/mods/isaa/base/Agent/agent.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 | |
builder
¶
A2AConfig
¶
Bases: BaseModel
A2A server configuration
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
100 101 102 103 104 105 106 107 108 109 110 | |
AgentConfig
¶
Bases: BaseModel
Complete agent configuration for loading/saving
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | |
CheckpointConfig
¶
Bases: BaseModel
Checkpoint configuration
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
123 124 125 126 127 128 129 | |
FlowAgentBuilder
¶Production-ready FlowAgent builder focused on MCP, A2A, and robust deployment
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 | |
__init__(config=None, config_path=None)
¶Initialize builder with configuration
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | |
add_mcp_tool_from_code(name, code, description='')
¶Add MCP tool from code string
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
973 974 975 976 977 978 979 980 981 | |
add_persona_profile(profile_name, name, style='professional', tone='friendly', personality_traits=None, custom_instructions='', response_format=None, text_length=None)
¶Add a persona profile with optional format configuration
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 | |
add_tool(func, name=None, description=None)
¶Add custom tool function
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
1055 1056 1057 1058 1059 1060 1061 | |
add_tools_from_module(module, prefix='', exclude=None)
¶Add all functions from a module as tools
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 | |
build()
async
¶Build the production-ready FlowAgent
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 | |
create_analyst_agent(name='AnalystAgent', with_telemetry=True)
classmethod
¶Create a pre-configured data analyst agent
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 | |
create_creative_agent(name='CreativeAgent')
classmethod
¶Create a creative assistant agent
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
1450 1451 1452 1453 1454 1455 1456 1457 | |
create_developer_agent(name='DeveloperAgent', with_mcp=True, with_a2a=False)
classmethod
¶Create a pre-configured developer agent
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 | |
create_executive_agent(name='ExecutiveAgent', with_integrations=True)
classmethod
¶Create an executive assistant agent
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 | |
create_general_assistant(name='AssistantAgent', full_integration=True)
classmethod
¶Create a general-purpose assistant with full integration
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 | |
enable_a2a_server(host='0.0.0.0', port=5000, agent_name=None, agent_description=None)
¶Enable A2A server for agent-to-agent communication
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 | |
enable_mcp_server(host='0.0.0.0', port=8000, server_name=None)
¶Enable MCP server
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
303 304 305 306 307 308 309 310 311 312 313 314 315 316 | |
enable_telemetry(service_name=None, endpoint=None, console_export=True)
¶Enable OpenTelemetry tracing
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 | |
from_config_file(config_path)
classmethod
¶Create builder from configuration file
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
256 257 258 259 | |
load_config(config_path)
¶Load agent configuration from file
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | |
load_mcp_tools_from_config(config_path)
¶Enhanced MCP config loading with automatic session management and full capability extraction
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 | |
save_config(config_path, format='yaml')
¶Save current configuration to file
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | |
set_active_persona(profile_name)
¶Set active persona profile
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
1114 1115 1116 1117 1118 1119 1120 1121 | |
validate_config()
¶Validate the current configuration
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 | |
verbose(enable=True)
¶Enable verbose logging
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
294 295 296 297 298 299 | |
with_analyst_persona(name='Data Analyst')
¶Add and set a pre-built analyst persona
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 | |
with_assistant_persona(name='AI Assistant')
¶Add and set a pre-built general assistant persona
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 | |
with_budget_manager(max_cost=10.0)
¶Enable budget management
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
285 286 287 288 289 290 291 292 | |
with_checkpointing(enabled=True, interval_seconds=300, checkpoint_dir='./checkpoints', max_checkpoints=10)
¶Configure checkpointing
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 | |
with_creative_persona(name='Creative Assistant')
¶Add and set a pre-built creative persona
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 | |
with_custom_variables(variables)
¶Add custom variables
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
1200 1201 1202 1203 | |
with_developer_persona(name='Senior Developer')
¶Add and set a pre-built developer persona
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 | |
with_executive_persona(name='Executive Assistant')
¶Add and set a pre-built executive persona
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 | |
with_models(fast_model, complex_model=None)
¶Set LLM models
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
268 269 270 271 272 273 | |
with_name(name)
¶Set agent name
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
263 264 265 266 | |
with_system_message(message)
¶Set system message
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
275 276 277 278 | |
with_temperature(temp)
¶Set temperature
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
280 281 282 283 | |
with_world_model(world_model)
¶Set initial world model
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
1205 1206 1207 1208 | |
MCPConfig
¶
Bases: BaseModel
MCP server and tools configuration
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
87 88 89 90 91 92 93 94 95 96 97 | |
TelemetryConfig
¶
Bases: BaseModel
OpenTelemetry configuration
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
113 114 115 116 117 118 119 120 | |
detect_shell()
¶Detects the best available shell and the argument to execute a command. Returns: A tuple of (shell_executable, command_argument). e.g., ('/bin/bash', '-c') or ('powershell.exe', '-Command')
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
example_production_usage()
async
¶Production usage example with full features
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 | |
example_quick_start()
async
¶Quick start examples for common scenarios
Source code in toolboxv2/mods/isaa/base/Agent/builder.py
1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 | |
chain
¶
CF
¶Chain Format - handles formatting and data extraction between tasks.
Source code in toolboxv2/mods/isaa/base/Agent/chain.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | |
__sub__(key)
¶Implements the - operator for data extraction keys.
Source code in toolboxv2/mods/isaa/base/Agent/chain.py
24 25 26 27 28 29 30 31 32 33 34 35 | |
Chain
¶
Bases: ChainBase
The main class for creating and executing sequential chains of tasks.
Source code in toolboxv2/mods/isaa/base/Agent/chain.py
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | |
a_run(query, **kwargs)
async
¶Executes the chain of tasks asynchronously with dynamic method selection, data extraction, and auto-parallelization.
Source code in toolboxv2/mods/isaa/base/Agent/chain.py
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | |
ChainBase
¶Abstract base class for all chain types, providing common operators.
Source code in toolboxv2/mods/isaa/base/Agent/chain.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | |
__add__(other)
¶Implements the + operator for parallel execution.
Source code in toolboxv2/mods/isaa/base/Agent/chain.py
57 58 59 | |
__and__(other)
¶Implements the & operator, an alias for parallel execution.
Source code in toolboxv2/mods/isaa/base/Agent/chain.py
61 62 63 | |
__call__(*args, **kwargs)
¶Allows the chain to be called like a function, returning an awaitable runner.
Source code in toolboxv2/mods/isaa/base/Agent/chain.py
93 94 95 | |
__mod__(other)
¶Implements the % operator for defining a false/else branch in a condition.
Source code in toolboxv2/mods/isaa/base/Agent/chain.py
69 70 71 72 73 74 75 76 | |
__or__(other)
¶Implements the | operator for defining a fallback/error handling path.
Source code in toolboxv2/mods/isaa/base/Agent/chain.py
65 66 67 | |
__rshift__(other)
¶Implements the >> operator to chain tasks sequentially.
Source code in toolboxv2/mods/isaa/base/Agent/chain.py
50 51 52 53 54 55 | |
set_progress_callback(progress_tracker)
¶Recursively sets the progress callback for all tasks in the chain.
Source code in toolboxv2/mods/isaa/base/Agent/chain.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 | |
ConditionalChain
¶
Bases: ChainBase
Handles conditional execution based on a condition.
Source code in toolboxv2/mods/isaa/base/Agent/chain.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | |
a_run(data, **kwargs)
async
¶Executes the true or false branch based on the condition.
Source code in toolboxv2/mods/isaa/base/Agent/chain.py
160 161 162 163 164 165 166 167 168 169 170 171 | |
ErrorHandlingChain
¶
Bases: ChainBase
Handles exceptions in a primary chain by executing a fallback chain.
Source code in toolboxv2/mods/isaa/base/Agent/chain.py
174 175 176 177 178 179 180 181 182 183 184 185 186 187 | |
a_run(query, **kwargs)
async
¶Tries the primary chain and executes the fallback on failure.
Source code in toolboxv2/mods/isaa/base/Agent/chain.py
181 182 183 184 185 186 187 | |
Function
¶
Bases: ChainBase
A wrapper to treat native Python functions as chainable components.
Source code in toolboxv2/mods/isaa/base/Agent/chain.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | |
a_run(data, **kwargs)
async
¶Executes the wrapped function, handling both sync and async cases.
Source code in toolboxv2/mods/isaa/base/Agent/chain.py
121 122 123 124 125 126 127 128 | |
IS
¶Conditional check for branching logic.
Source code in toolboxv2/mods/isaa/base/Agent/chain.py
37 38 39 40 41 42 | |
ParallelChain
¶
Bases: ChainBase
Handles parallel execution of multiple agents or chains.
Source code in toolboxv2/mods/isaa/base/Agent/chain.py
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |
a_run(query, **kwargs)
async
¶Runs all agents/chains in parallel.
Source code in toolboxv2/mods/isaa/base/Agent/chain.py
139 140 141 142 143 | |
chain_to_graph(self)
¶Convert chain to hierarchical structure with complete component detection.
Source code in toolboxv2/mods/isaa/base/Agent/chain.py
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 | |
print_graph(self)
¶Enhanced chain visualization with complete functionality coverage and parallel detection.
Source code in toolboxv2/mods/isaa/base/Agent/chain.py
497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 | |
config
¶
A2AConfig
¶
Bases: BaseModel
Configuration for A2A integration.
Source code in toolboxv2/mods/isaa/base/Agent/config.py
116 117 118 119 120 121 122 | |
ADKConfig
¶
Bases: BaseModel
Configuration for ADK integration.
Source code in toolboxv2/mods/isaa/base/Agent/config.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | |
AgentConfig
¶
Bases: BaseModel
Main configuration schema for an EnhancedAgent.
Source code in toolboxv2/mods/isaa/base/Agent/config.py
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | |
load_from_yaml(path)
classmethod
¶Loads configuration from a YAML file.
Source code in toolboxv2/mods/isaa/base/Agent/config.py
201 202 203 204 205 206 207 208 209 210 | |
save_to_yaml(path)
¶Saves the current configuration to a YAML file.
Source code in toolboxv2/mods/isaa/base/Agent/config.py
212 213 214 215 216 217 218 219 | |
MCPConfig
¶
Bases: BaseModel
Configuration for MCP integration.
Source code in toolboxv2/mods/isaa/base/Agent/config.py
107 108 109 110 111 112 113 | |
ModelConfig
¶
Bases: BaseModel
Configuration specific to an LLM model via LiteLLM.
Source code in toolboxv2/mods/isaa/base/Agent/config.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | |
ObservabilityConfig
¶
Bases: BaseModel
Configuration for observability (OpenTelemetry).
Source code in toolboxv2/mods/isaa/base/Agent/config.py
125 126 127 128 129 130 131 132 | |
executors
¶
DockerCodeExecutor
¶
Bases: _BaseExecutorClass
Executes Python code in a sandboxed Docker container.
Requires Docker to be installed and running, and the 'docker' Python SDK.
Source code in toolboxv2/mods/isaa/base/Agent/executors.py
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | |
execute(code)
¶Directly execute code, returning detailed dictionary.
Source code in toolboxv2/mods/isaa/base/Agent/executors.py
333 334 335 336 | |
RestrictedPythonExecutor
¶
Bases: _BaseExecutorClass
Executes Python code using restrictedpython.
Safer than exec() but NOT a full sandbox. Known vulnerabilities exist. Use with extreme caution and only with trusted code sources or for low-risk operations. Docker is strongly recommended for untrusted code.
Source code in toolboxv2/mods/isaa/base/Agent/executors.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | |
execute(code)
¶Directly execute code, returning detailed dictionary.
Source code in toolboxv2/mods/isaa/base/Agent/executors.py
193 194 195 196 | |
get_code_executor(config)
¶Creates a code executor instance based on configuration.
Source code in toolboxv2/mods/isaa/base/Agent/executors.py
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 | |
types
¶
AgentCheckpoint
dataclass
¶Enhanced AgentCheckpoint with UnifiedContextManager and ChatSession integration
Source code in toolboxv2/mods/isaa/base/Agent/types.py
552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 | |
get_checkpoint_summary()
¶Get human-readable checkpoint summary
Source code in toolboxv2/mods/isaa/base/Agent/types.py
575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 | |
get_storage_size_estimate()
¶Estimate storage size of different checkpoint components
Source code in toolboxv2/mods/isaa/base/Agent/types.py
615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 | |
get_version_info()
¶Get checkpoint version information
Source code in toolboxv2/mods/isaa/base/Agent/types.py
699 700 701 702 703 704 705 706 707 708 | |
validate_checkpoint_integrity()
¶Validate checkpoint integrity and completeness
Source code in toolboxv2/mods/isaa/base/Agent/types.py
640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 | |
AgentModelData
¶
Bases: BaseModel
Source code in toolboxv2/mods/isaa/base/Agent/types.py
768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 | |
get_system_message_with_persona()
¶Get system message with persona integration
Source code in toolboxv2/mods/isaa/base/Agent/types.py
783 784 785 786 787 788 789 790 791 792 | |
ChainMetadata
dataclass
¶Metadata for stored chains
Source code in toolboxv2/mods/isaa/base/Agent/types.py
808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 | |
DecisionTask
dataclass
¶
Bases: Task
Task für dynamisches Routing
Source code in toolboxv2/mods/isaa/base/Agent/types.py
498 499 500 501 502 503 | |
FormatConfig
dataclass
¶Konfiguration für Response-Format und -Länge
Source code in toolboxv2/mods/isaa/base/Agent/types.py
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 | |
get_combined_instructions()
¶Kombiniere Format- und Längen-Anweisungen
Source code in toolboxv2/mods/isaa/base/Agent/types.py
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 | |
get_expected_word_range()
¶Erwartete Wortanzahl für Qualitätsbewertung
Source code in toolboxv2/mods/isaa/base/Agent/types.py
416 417 418 419 420 421 422 423 424 425 | |
get_format_instructions()
¶Generiere Format-spezifische Anweisungen
Source code in toolboxv2/mods/isaa/base/Agent/types.py
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 | |
get_length_instructions()
¶Generiere Längen-spezifische Anweisungen
Source code in toolboxv2/mods/isaa/base/Agent/types.py
388 389 390 391 392 393 394 395 396 397 | |
LLMTask
dataclass
¶
Bases: Task
Spezialisierter Task für LLM-Aufrufe
Source code in toolboxv2/mods/isaa/base/Agent/types.py
475 476 477 478 479 480 481 482 483 484 485 | |
PersonaConfig
dataclass
¶Source code in toolboxv2/mods/isaa/base/Agent/types.py
710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 | |
should_post_process()
¶Check if post-processing should be applied
Source code in toolboxv2/mods/isaa/base/Agent/types.py
764 765 766 | |
to_system_prompt_addition()
¶Convert persona to system prompt addition with format integration
Source code in toolboxv2/mods/isaa/base/Agent/types.py
724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 | |
update_format(response_format, text_length, custom_instructions='')
¶Dynamische Format-Aktualisierung
Source code in toolboxv2/mods/isaa/base/Agent/types.py
745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 | |
PlanData
¶
Bases: BaseModel
Dataclass for plan data
Source code in toolboxv2/mods/isaa/base/Agent/types.py
506 507 508 509 510 511 | |
ProgressEvent
dataclass
¶Enhanced progress event with better error handling
Source code in toolboxv2/mods/isaa/base/Agent/types.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | |
from_dict(data)
classmethod
¶Create ProgressEvent from dictionary
Source code in toolboxv2/mods/isaa/base/Agent/types.py
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | |
get_chat_display_data()
¶Get data optimized for chat view display
Source code in toolboxv2/mods/isaa/base/Agent/types.py
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | |
get_detailed_display_data()
¶Get complete filtered data for detailed popup view
Source code in toolboxv2/mods/isaa/base/Agent/types.py
263 264 265 | |
get_progress_summary()
¶Get a brief summary for progress sidebar
Source code in toolboxv2/mods/isaa/base/Agent/types.py
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | |
to_dict()
¶Return event data with None values removed for compact display
Source code in toolboxv2/mods/isaa/base/Agent/types.py
209 210 211 212 213 214 215 216 217 218 219 220 221 222 | |
ProgressTracker
¶Advanced progress tracking with cost calculation
Source code in toolboxv2/mods/isaa/base/Agent/types.py
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 | |
calculate_llm_cost(model, input_tokens, output_tokens, completion_response=None)
¶Calculate approximate LLM cost
Source code in toolboxv2/mods/isaa/base/Agent/types.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | |
emit_event(event)
async
¶Emit progress event with callback and storage
Source code in toolboxv2/mods/isaa/base/Agent/types.py
299 300 301 302 303 304 305 306 307 308 309 310 311 312 | |
end_timer(key)
¶End timing operation and return duration
Source code in toolboxv2/mods/isaa/base/Agent/types.py
321 322 323 324 325 326 327 | |
get_summary()
¶Get comprehensive progress summary
Source code in toolboxv2/mods/isaa/base/Agent/types.py
347 348 349 350 351 352 353 354 355 356 357 358 359 360 | |
start_timer(key)
¶Start timing operation
Source code in toolboxv2/mods/isaa/base/Agent/types.py
315 316 317 318 319 | |
Task
dataclass
¶Source code in toolboxv2/mods/isaa/base/Agent/types.py
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 | |
__post_init__()
¶Ensure all mutable defaults are properly initialized
Source code in toolboxv2/mods/isaa/base/Agent/types.py
449 450 451 452 453 454 455 456 | |
ToolAnalysis
¶
Bases: BaseModel
Defines the structure for a valid tool analysis.
Source code in toolboxv2/mods/isaa/base/Agent/types.py
795 796 797 798 799 800 801 802 803 804 805 | |
ToolTask
dataclass
¶
Bases: Task
Spezialisierter Task für Tool-Aufrufe
Source code in toolboxv2/mods/isaa/base/Agent/types.py
488 489 490 491 492 493 494 495 | |
create_task(task_type, **kwargs)
¶Factory für Task-Erstellung mit korrektem Typ
Source code in toolboxv2/mods/isaa/base/Agent/types.py
515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 | |
utils
¶
LLMMessage
dataclass
¶Represents a message in a conversation with the LLM.
Source code in toolboxv2/mods/isaa/base/Agent/utils.py
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | |
to_dict()
¶Convert to dictionary, handling potential dataclass nuances.
Source code in toolboxv2/mods/isaa/base/Agent/utils.py
144 145 146 147 148 149 150 151 | |
WorldModel
dataclass
¶Thread-safe representation of the agent's persistent understanding of the world.
Source code in toolboxv2/mods/isaa/base/Agent/utils.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | |
AgentUtils
¶
AISemanticMemory
¶
Source code in toolboxv2/mods/isaa/base/AgentUtils.py
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 | |
__init__(base_path='/semantic_memory', default_model=os.getenv('BLITZMODEL'), default_embedding_model=os.getenv('DEFAULTMODELEMBEDDING'), default_similarity_threshold=0.61, default_batch_size=64, default_n_clusters=2, default_deduplication_threshold=0.85)
¶Initialize AISemanticMemory with KnowledgeBase integration
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_path
|
str
|
Root directory for memory storage |
'/semantic_memory'
|
default_model
|
str
|
Default model for text generation |
getenv('BLITZMODEL')
|
default_embedding_model
|
str
|
Default embedding model |
getenv('DEFAULTMODELEMBEDDING')
|
default_similarity_threshold
|
float
|
Default similarity threshold for retrieval |
0.61
|
default_batch_size
|
int
|
Default batch size for processing |
64
|
default_n_clusters
|
int
|
Default number of clusters for FAISS |
2
|
default_deduplication_threshold
|
float
|
Default threshold for deduplication |
0.85
|
Source code in toolboxv2/mods/isaa/base/AgentUtils.py
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | |
add_data(memory_name, data, metadata=None, direct=False)
async
¶Add data to memory store
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
memory_name
|
str
|
Target memory store |
required |
data
|
str | list[str] | bytes | dict
|
Text, list of texts, binary file, or structured data |
required |
metadata
|
dict | None
|
Optional metadata |
None
|
Source code in toolboxv2/mods/isaa/base/AgentUtils.py
418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 | |
create_memory(name, model_config=None, storage_config=None)
¶Create new memory store with KnowledgeBase
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Unique name for the memory store |
required |
model_config
|
dict | None
|
Configuration for embedding model |
None
|
storage_config
|
dict | None
|
Configuration for KnowledgeBase parameters |
None
|
Source code in toolboxv2/mods/isaa/base/AgentUtils.py
368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 | |
delete_memory(name)
async
¶Delete a memory store
Source code in toolboxv2/mods/isaa/base/AgentUtils.py
541 542 543 544 545 546 547 | |
list_memories()
¶List all available memories
Source code in toolboxv2/mods/isaa/base/AgentUtils.py
537 538 539 | |
load_all_memories(path)
¶Load all memory stores from disk
Source code in toolboxv2/mods/isaa/base/AgentUtils.py
570 571 572 573 574 575 576 577 578 579 580 581 582 583 | |
load_memory(name, path)
¶Load a memory store from disk
Source code in toolboxv2/mods/isaa/base/AgentUtils.py
585 586 587 588 589 590 591 592 593 594 595 | |
query(query, memory_names=None, query_params=None, to_str=False, unified_retrieve=False)
async
¶Query memories using KnowledgeBase retrieval
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
str
|
Search query |
required |
memory_names
|
str | list[str] | None
|
Target memory names |
None
|
query_params
|
dict | None
|
Query parameters |
None
|
to_str
|
bool
|
Return string format |
False
|
unified_retrieve
|
bool
|
Unified retrieve |
False
|
Source code in toolboxv2/mods/isaa/base/AgentUtils.py
465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 | |
save_all_memories(path)
¶Save all memory stores to disk
Source code in toolboxv2/mods/isaa/base/AgentUtils.py
560 561 562 563 564 565 566 567 568 | |
save_memory(name, path)
¶Save a memory store to disk
Source code in toolboxv2/mods/isaa/base/AgentUtils.py
549 550 551 552 553 554 555 556 557 558 | |
PyEnvEval
¶
Source code in toolboxv2/mods/isaa/base/AgentUtils.py
771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 | |
run_and_display(python_code)
¶function to eval python code
Source code in toolboxv2/mods/isaa/base/AgentUtils.py
796 797 798 799 800 801 | |
anything_from_str_to_dict(data, expected_keys=None, mini_task=lambda x: '')
¶
Versucht, einen String in ein oder mehrere Dictionaries umzuwandeln. Berücksichtigt dabei die erwarteten Schlüssel und ihre Standardwerte.
Source code in toolboxv2/mods/isaa/base/AgentUtils.py
1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 | |
complete_json_object(data, mini_task)
¶
Ruft eine Funktion auf, um einen String in das richtige Format zu bringen. Gibt das resultierende JSON-Objekt zurück, wenn die Funktion erfolgreich ist, sonst None.
Source code in toolboxv2/mods/isaa/base/AgentUtils.py
1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 | |
detect_shell()
¶
Detects the best available shell and the argument to execute a command. Returns: A tuple of (shell_executable, command_argument). e.g., ('/bin/bash', '-c') or ('powershell.exe', '-Command')
Source code in toolboxv2/mods/isaa/base/AgentUtils.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | |
extract_text_natively(data, filename='')
¶
Extrahiert Text aus verschiedenen Dateitypen mit nativen Python-Methoden oder reinen Python-Bibliotheken (speziell PyPDF2 für PDFs).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
bytes
|
Der Inhalt der Datei als Bytes. |
required |
filename
|
str
|
Der Originaldateiname, um den Typ zu bestimmen. |
''
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Der extrahierte Text. |
Raises:
| Type | Description |
|---|---|
ValueError
|
Wenn der Dateityp nicht unterstützt wird oder die Verarbeitung fehlschlägt. |
ImportError
|
Wenn PyPDF2 für die Verarbeitung von PDF-Dateien benötigt, aber nicht installiert ist. |
Source code in toolboxv2/mods/isaa/base/AgentUtils.py
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | |
find_json_objects_in_str(data)
¶
Sucht nach JSON-Objekten innerhalb eines Strings. Gibt eine Liste von JSON-Objekten zurück, die im String gefunden wurden.
Source code in toolboxv2/mods/isaa/base/AgentUtils.py
1229 1230 1231 1232 1233 1234 1235 1236 1237 | |
get_json_from_json_str(json_str, repeat=1)
¶
Versucht, einen JSON-String in ein Python-Objekt umzuwandeln.
Wenn beim Parsen ein Fehler auftritt, versucht die Funktion, das Problem zu beheben,
indem sie das Zeichen an der Position des Fehlers durch ein Escape-Zeichen ersetzt.
Dieser Vorgang wird bis zu repeat-mal wiederholt.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json_str
|
str or list or dict
|
Der JSON-String, der geparst werden soll. |
required |
repeat
|
int
|
Die Anzahl der Versuche, das Parsen durchzuführen. |
1
|
Returns:
| Type | Description |
|---|---|
dict or None
|
Das resultierende Python-Objekt. |
Source code in toolboxv2/mods/isaa/base/AgentUtils.py
1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 | |
parse_json_with_auto_detection(json_data)
¶
Parses JSON data, automatically detecting if a value is a JSON string and parsing it accordingly. If a value cannot be parsed as JSON, it is returned as is.
Source code in toolboxv2/mods/isaa/base/AgentUtils.py
1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 | |
KnowledgeBase
¶
Chunk
dataclass
¶
Represents a chunk of text with its embedding and metadata
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
27 28 29 30 31 32 33 34 | |
ConceptAnalysis
¶
Bases: BaseModel
Represents the analysis of key concepts.
Attributes:
| Name | Type | Description |
|---|---|---|
key_concepts |
list[str]
|
A list of primary key concepts identified. |
relationships |
list[str]
|
A list of relationships between the identified key concepts. |
importance_hierarchy |
list[str]
|
A list that represents the hierarchical importance of the key concepts. |
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
111 112 113 114 115 116 117 118 119 120 121 122 | |
ConceptExtractor
¶
Handles extraction of concepts and relationships from text
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | |
extract_concepts(texts, metadatas)
async
¶Extract concepts from texts using concurrent processing with rate limiting. Requests are made at the specified rate while responses are processed asynchronously.
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 | |
process_chunks(chunks)
async
¶Process all chunks in batch to extract and store concepts. Each chunk's metadata will be updated with the concept names and relationships.
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | |
query_concepts(query)
async
¶Query the concept graph based on natural language query
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | |
ConceptGraph
¶
Manages concept relationships and hierarchies
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | |
add_concept(concept)
¶Add or update a concept in the graph
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
174 175 176 177 178 179 180 181 182 183 184 185 186 187 | |
convert_to_networkx()
¶Convert ConceptGraph to NetworkX graph with layout
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | |
get_related_concepts(concept_name, relationship_type=None)
¶Get related concepts, optionally filtered by relationship type
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
189 190 191 192 193 194 195 196 197 198 199 200 201 | |
Concepts
¶
Bases: BaseModel
Represents a collection of key concepts.
Attributes:
| Name | Type | Description |
|---|---|---|
concepts |
List[rConcept]
|
A list of Concept instances, each representing an individual key concept. |
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
102 103 104 105 106 107 108 109 | |
DataModel
¶
Bases: BaseModel
The main data model that encapsulates the overall analysis.
Attributes:
| Name | Type | Description |
|---|---|---|
main_summary |
str
|
A Detailed overview summarizing the key findings and relations format MD string. |
concept_analysis |
ConceptAnalysis
|
An instance containing the analysis of key concepts. |
topic_insights |
TopicInsights
|
An instance containing insights regarding the topics. |
relevance_assessment |
RelevanceAssessment
|
An instance assessing the relevance and alignment of the query. |
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
153 154 155 156 157 158 159 160 161 162 163 164 165 166 | |
DynamicRateLimiter
¶
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | |
acquire()
async
¶Acquire permission to make a request
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
266 267 268 269 270 271 272 273 274 | |
update_rate(requests_per_second)
¶Update rate limit dynamically
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
262 263 264 | |
GraphVisualizer
¶
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | |
visualize(nx_graph, output_file='concept_graph.html', get_output=False)
staticmethod
¶Create interactive visualization using PyVis
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | |
KnowledgeBase
¶
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 | |
__init__(embedding_dim=256, similarity_threshold=0.61, batch_size=12, n_clusters=4, deduplication_threshold=0.85, model_name=os.getenv('SUMMARYMODEL'), embedding_model=os.getenv('DEFAULTMODELEMBEDDING'), vis_class='FaissVectorStore', vis_kwargs=None, requests_per_second=85.0, chunk_size=3600, chunk_overlap=130, separator='\n')
¶Initialize the knowledge base with given parameters
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 | |
add_data(texts, metadata=None, direct=False)
async
¶Enhanced version with smart splitting and clustering
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 | |
compute_hash(text)
staticmethod
¶Compute SHA-256 hash of text
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
681 682 683 684 | |
forget_irrelevant(irrelevant_concepts, similarity_threshold=None)
async
¶Remove chunks similar to irrelevant concepts Returns: Number of chunks removed
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 | |
load(path)
classmethod
¶Load a complete knowledge base from disk, including all sub-components
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Path from where to load the knowledge base |
required |
Returns:
| Name | Type | Description |
|---|---|---|
KnowledgeBase |
KnowledgeBase
|
A fully restored knowledge base instance |
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 | |
query_concepts(query)
async
¶Query concepts extracted from the knowledge base
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
1488 1489 1490 | |
retrieve(query='', query_embedding=None, k=5, min_similarity=0.2, include_connected=True)
async
¶Enhanced retrieval with connected information
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 | |
retrieve_with_overview(query, query_embedding=None, k=5, min_similarity=0.2, max_sentences=5, cross_ref_depth=2, max_cross_refs=10)
async
¶Enhanced retrieval with better cross-reference handling
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 | |
save(path)
¶Save the complete knowledge base to disk, including all sub-components
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Path where the knowledge base will be saved |
required |
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 | |
unified_retrieve(query, k=5, min_similarity=0.2, cross_ref_depth=2, max_cross_refs=10, max_sentences=10)
async
¶Unified retrieval function that combines concept querying, retrieval with overview, and basic retrieval, then generates a comprehensive summary using LLM.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
str
|
Search query string |
required |
k
|
int
|
Number of primary results to retrieve |
5
|
min_similarity
|
float
|
Minimum similarity threshold for retrieval |
0.2
|
cross_ref_depth
|
int
|
Depth for cross-reference search |
2
|
max_cross_refs
|
int
|
Maximum number of cross-references per topic |
10
|
max_sentences
|
int
|
Maximum number Sentences in the main summary text |
10
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dictionary containing comprehensive results including summary and details |
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 | |
RelevanceAssessment
¶
Bases: BaseModel
Represents an assessment of the relevance of the data in relation to a specific query.
Attributes:
| Name | Type | Description |
|---|---|---|
query_alignment |
float
|
A float representing the alignment between the query and the data. |
confidence_score |
float
|
A float indicating the confidence level in the alignment. |
coverage_analysis |
str
|
A textual description analyzing the data coverage. |
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
139 140 141 142 143 144 145 146 147 148 149 150 | |
RetrievalResult
dataclass
¶
Structure for organizing retrieval results
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
37 38 39 40 41 42 | |
TConcept
¶
Bases: BaseModel
Represents the criteria or target parameters for concept selection and filtering.
Attributes:
| Name | Type | Description |
|---|---|---|
min_importance |
float
|
The minimum importance score a concept must have to be considered. |
target_concepts |
List[str]
|
A list of names of target concepts to focus on. |
relationship_types |
List[str]
|
A list of relationship types to be considered in the analysis. |
categories |
List[str]
|
A list of concept categories to filter or group the concepts. |
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 | |
TextSplitter
¶
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 | |
approximate(text_len)
¶Approximate the number of chunks and average chunk size for a given text length
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text_len
|
int
|
Length of the text to be split |
required |
Returns:
| Type | Description |
|---|---|
float
|
Tuple[int, int]: (number_of_chunks, approximate_chunk_size) |
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 | |
split_text(text)
¶Split text into chunks with overlap
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 | |
TopicInsights
¶
Bases: BaseModel
Represents insights related to various topics.
Attributes:
| Name | Type | Description |
|---|---|---|
primary_topics |
list[str]
|
A list of main topics addressed. |
cross_references |
list[str]
|
A list of cross-references that connect different topics. |
knowledge_gaps |
list[str]
|
A list of identified gaps in the current knowledge. |
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
125 126 127 128 129 130 131 132 133 134 135 136 | |
rConcept
¶
Bases: BaseModel
Represents a key concept with its relationships and associated metadata.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
The name of the concept. |
category |
str
|
The category of the concept (e.g., 'technical', 'domain', 'method', etc.). |
relationships |
Dict[str, List[str]]
|
A mapping where each key is a type of relationship and the value is a list of related concept names. |
importance_score |
float
|
A numerical score representing the importance or relevance of the concept. |
context_snippets |
List[str]
|
A list of text snippets providing context where the concept appears. |
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | |
normalize_vectors(vectors)
¶
Normalize vectors to unit length
Source code in toolboxv2/mods/isaa/base/KnowledgeBase.py
52 53 54 55 | |
VectorStores
¶
Vector store implementations for the toolboxv2 system.
taichiNumpyNumbaVectorStores
¶
NumpyVectorStore
¶
Bases: AbstractVectorStore
Source code in toolboxv2/mods/isaa/base/VectorStores/taichiNumpyNumbaVectorStores.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | |
types
¶
AbstractVectorStore
¶
Bases: ABC
Abstract base class for vector stores
Source code in toolboxv2/mods/isaa/base/VectorStores/types.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | |
add_embeddings(embeddings, chunks)
abstractmethod
¶Add embeddings and their corresponding chunks to the store
Source code in toolboxv2/mods/isaa/base/VectorStores/types.py
21 22 23 24 | |
clear()
abstractmethod
¶Clear all data from the store
Source code in toolboxv2/mods/isaa/base/VectorStores/types.py
41 42 43 44 | |
load(data)
abstractmethod
¶Load the vector store from disk
Source code in toolboxv2/mods/isaa/base/VectorStores/types.py
36 37 38 39 | |
rebuild_index()
abstractmethod
¶Optional for faster searches
Source code in toolboxv2/mods/isaa/base/VectorStores/types.py
46 47 48 49 | |
save()
abstractmethod
¶Save the vector store to disk
Source code in toolboxv2/mods/isaa/base/VectorStores/types.py
31 32 33 34 | |
search(query_embedding, k=5, min_similarity=0.7)
abstractmethod
¶Search for similar vectors
Source code in toolboxv2/mods/isaa/base/VectorStores/types.py
26 27 28 29 | |
Chunk
dataclass
¶Represents a chunk of text with its embedding and metadata
Source code in toolboxv2/mods/isaa/base/VectorStores/types.py
8 9 10 11 12 13 14 15 | |
extras
¶
adapter
¶
LiteLLM LLM Interface Module¶
This module provides interfaces for interacting with LiteLLM's language models, including text generation and embedding capabilities.
Author: Lightrag Team Created: 2025-02-04 License: MIT License Version: 1.0.0
Change Log: - 1.0.0 (2025-02-04): Initial LiteLLM release * Ported OpenAI logic to use litellm async client * Updated error types and environment variable names * Preserved streaming and embedding support
Dependencies
- litellm
- numpy
- pipmaster
- Python >= 3.10
Usage
from llm_interfaces.litellm import logging
if not hasattr(logging, 'NONE'): logging.NONE = 100
import litellm_complete, litellm_embed
litellm_complete(prompt, system_prompt=None, history_messages=None, keyword_extraction=False, model_name='groq/gemma2-9b-it', **kwargs)
async
¶
Public completion interface using the model name specified in the global configuration. Optionally extracts keywords if requested.
Source code in toolboxv2/mods/isaa/extras/adapter.py
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
litellm_complete_if_cache(model, prompt, system_prompt=None, history_messages=None, base_url=None, api_key=None, **kwargs)
async
¶
Core function to query the LiteLLM model. It builds the message context, invokes the completion API, and returns either a complete result string or an async iterator for streaming responses.
Source code in toolboxv2/mods/isaa/extras/adapter.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | |
litellm_embed(texts, model='gemini/text-embedding-004', dimensions=256, base_url=None, api_key=None)
async
¶
Generates embeddings for the given list of texts using LiteLLM.
Source code in toolboxv2/mods/isaa/extras/adapter.py
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | |
cahin_printer
¶
ChainPrinter
¶
Custom printer for enhanced chain visualization and progress display
Source code in toolboxv2/mods/isaa/extras/cahin_printer.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | |
print_chain_list(chains)
¶Print formatted list of available chains
Source code in toolboxv2/mods/isaa/extras/cahin_printer.py
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | |
print_header(title, subtitle=None)
¶Print formatted header
Source code in toolboxv2/mods/isaa/extras/cahin_printer.py
84 85 86 87 88 89 90 | |
ChainProgressTracker
¶
Enhanced progress tracker for chain execution with live display
Source code in toolboxv2/mods/isaa/extras/cahin_printer.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
emit_event(event)
async
¶Emit progress event with live display updates
Source code in toolboxv2/mods/isaa/extras/cahin_printer.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
mcp_session_manager
¶
MCPSessionManager
¶
Manages persistent MCP sessions with automatic reconnection and parallel processing
Source code in toolboxv2/mods/isaa/extras/mcp_session_manager.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 | |
cleanup_all()
async
¶Clean up all sessions with timeout and proper error handling
Source code in toolboxv2/mods/isaa/extras/mcp_session_manager.py
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 | |
extract_capabilities(session, server_name)
async
¶Extract all capabilities from MCP session
Source code in toolboxv2/mods/isaa/extras/mcp_session_manager.py
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | |
extract_capabilities_with_timeout(session, server_name)
async
¶Extract capabilities with timeout protection
Source code in toolboxv2/mods/isaa/extras/mcp_session_manager.py
169 170 171 172 173 174 175 176 177 178 | |
get_session(server_name, server_config)
async
¶Get or create persistent MCP session with proper context management
Source code in toolboxv2/mods/isaa/extras/mcp_session_manager.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |
get_session_with_timeout(server_name, server_config)
async
¶Get session with timeout protection
Source code in toolboxv2/mods/isaa/extras/mcp_session_manager.py
25 26 27 28 29 30 31 32 33 34 | |
modes
¶
generate_prompt(subject, context='', additional_requirements=None)
¶
Generates a prompt based on the given subject, with optional context and additional requirements.
Parameters: - subject (str): The main subject for the prompt. - context (str): Optional additional context to tailor the prompt. - additional_requirements (Dict[str, Any]): Optional additional parameters or requirements for the prompt.
Returns: - str: A crafted prompt.
Source code in toolboxv2/mods/isaa/extras/modes.py
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | |
terminal_progress
¶
AgentExecutionState
¶
Verwaltet den gesamten Zustand des Agentenablaufs, um eine reichhaltige Visualisierung zu ermöglichen.
Source code in toolboxv2/mods/isaa/extras/terminal_progress.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | |
ProgressiveTreePrinter
¶
Eine moderne, produktionsreife Terminal-Visualisierung für den Agenten-Ablauf.
Source code in toolboxv2/mods/isaa/extras/terminal_progress.py
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 | |
clear()
staticmethod
¶Speichert aktuellen Terminal-Content und cleared das Terminal Systemagnostisch (Windows/Unix)
Source code in toolboxv2/mods/isaa/extras/terminal_progress.py
389 390 391 392 393 394 395 396 397 398 399 | |
live_print(*args, **kwargs)
¶Live print ohne Content-Speicherung für temporäre Ausgaben
Source code in toolboxv2/mods/isaa/extras/terminal_progress.py
383 384 385 386 387 | |
print(*args, **kwargs)
¶Überladene print Funktion die automatisch Content speichert
Source code in toolboxv2/mods/isaa/extras/terminal_progress.py
365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 | |
print_final_summary()
¶Zeigt die finale Zusammenfassung.
Source code in toolboxv2/mods/isaa/extras/terminal_progress.py
768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 | |
progress_callback(event)
async
¶Haupteingangspunkt für Progress Events.
Source code in toolboxv2/mods/isaa/extras/terminal_progress.py
459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 | |
restore_content()
¶Stellt den gespeicherten Terminal-Content in einer Aktion wieder her Effizient durch join operation
Source code in toolboxv2/mods/isaa/extras/terminal_progress.py
401 402 403 404 405 406 407 408 409 | |
StateProcessor
¶
Verarbeitet ProgressEvents und aktualisiert den AgentExecutionState.
Source code in toolboxv2/mods/isaa/extras/terminal_progress.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | |
arguments_summary(tool_args, max_length=50)
¶
Creates a summary of the tool arguments for display purposes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tool_args
|
dict[str, Any]
|
Dictionary containing tool arguments |
required |
max_length
|
int
|
Maximum length for individual argument values in summary |
50
|
Returns:
| Type | Description |
|---|---|
str
|
Formatted string summary of the arguments |
Source code in toolboxv2/mods/isaa/extras/terminal_progress.py
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | |
human_readable_time(seconds)
¶
Konvertiert Sekunden in ein menschlich lesbares Format.
Source code in toolboxv2/mods/isaa/extras/terminal_progress.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |
verbose_output
¶
DynamicVerboseFormatter
¶
Unified, dynamic formatter that adapts to screen size
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | |
get_git_info()
¶Checks for a git repo and returns its name and branch, or None.
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | |
print_code_block(code, language='python')
¶Print code with syntax awareness and proper formatting
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | |
print_debug(message)
¶Print debug message with consistent formatting
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
336 337 338 | |
print_error(message)
¶Print error message with consistent formatting
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
320 321 322 | |
print_git_info()
¶Get current git branch with error handling
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | |
print_header(text)
¶Print a dynamic header that adapts to screen size
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | |
print_info(message)
¶Print info message with consistent formatting
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
332 333 334 | |
print_progress_bar(current, maximum, title='Progress')
¶Dynamic progress bar that adapts to screen size
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | |
print_section(title, content)
¶Print a clean section with adaptive formatting
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | |
print_state(state, details=None)
¶Print current state with adaptive formatting
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | |
print_success(message)
¶Print success message with consistent formatting
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
324 325 326 | |
print_table(headers, rows)
¶Print a dynamic table that adapts to screen size
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | |
print_warning(message)
¶Print warning message with consistent formatting
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
328 329 330 | |
process_with_spinner(message, coroutine)
async
¶Execute coroutine with adaptive spinner
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | |
EnhancedVerboseOutput
¶
Main interface for verbose output with full functionality
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 | |
__getattr__(name)
¶Delegate to formatter for convenience
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
350 351 352 | |
clear_line()
¶Clear current line
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
537 538 539 | |
log_header(text)
¶Log header with timing information
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
418 419 420 421 422 423 424 425 426 | |
log_message(role, content)
async
¶Log chat messages with role-based formatting
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 | |
log_process_result(result)
async
¶Log processing results with structured formatting
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 | |
log_state(state, user_ns=None, override=False)
¶Log state with optional override
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
428 429 430 431 432 433 | |
print_error(message)
¶Print an error message with red style
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
550 551 552 553 | |
print_event(event)
¶Print event information
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 | |
print_separator(char='─')
¶Print a separator line
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
541 542 543 | |
print_success(message)
¶Print a success message with green style
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
555 556 557 558 | |
print_tool_call(tool_name, tool_args, result=None)
¶Gibt Informationen zum Tool-Aufruf aus. Versucht, das Ergebnis als JSON zu formatieren, wenn möglich.
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 | |
print_warning(message)
¶Print a warning message with yellow style
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
545 546 547 548 | |
process(message, coroutine)
async
¶Process with optional spinner
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
435 436 437 438 439 440 441 442 443 | |
section_context(title)
¶Context manager for sections
Source code in toolboxv2/mods/isaa/extras/verbose_output.py
526 527 528 529 530 531 532 533 534 535 | |
web_search
¶
clean_markdown_robust(content)
¶
Robust markdown cleaning
Source code in toolboxv2/mods/isaa/extras/web_search.py
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 | |
convert_to_markdown(element)
¶
Convert HTML element to markdown with fallbacks
Source code in toolboxv2/mods/isaa/extras/web_search.py
364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 | |
find_main_content(soup)
¶
Find main content using multiple strategies
Source code in toolboxv2/mods/isaa/extras/web_search.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 | |
is_content_parseable(content)
¶
Check if content is properly parsed and readable
Source code in toolboxv2/mods/isaa/extras/web_search.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | |
is_mostly_readable(text)
¶
Check if text is mostly readable ASCII/common unicode
Source code in toolboxv2/mods/isaa/extras/web_search.py
320 321 322 323 324 325 326 | |
robust_search()
¶
Test the robust search functionality
Source code in toolboxv2/mods/isaa/extras/web_search.py
635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 | |
url_to_markdown_robust(url)
¶
Robust URL to markdown converter with multiple encoding strategies
Source code in toolboxv2/mods/isaa/extras/web_search.py
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | |
web_search(query, max_results=5)
¶
Main search function with robust fallbacks
Source code in toolboxv2/mods/isaa/extras/web_search.py
600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 | |
web_search_bing(query, max_results=5, api_key=None)
¶
Web search using Bing Search API (free tier: 3,000 queries/month) Get your free API key at: https://azure.microsoft.com/en-us/services/cognitive-services/bing-web-search-api/
Source code in toolboxv2/mods/isaa/extras/web_search.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | |
web_search_robust(query, max_results=5, max_attempts=15)
¶
Robust search that keeps trying until it gets enough good results
Source code in toolboxv2/mods/isaa/extras/web_search.py
466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 | |
web_search_serpapi(query, max_results=5, api_key=None)
¶
Web search using SerpAPI (free tier: 100 searches/month) Get your free API key at: https://serpapi.com/
Source code in toolboxv2/mods/isaa/extras/web_search.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | |
module
¶
EnhancedAgentRequestHandler
¶
Bases: BaseHTTPRequestHandler
Enhanced HTTP request handler for standalone server with comprehensive UI support.
Source code in toolboxv2/mods/isaa/module.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 | |
do_GET()
¶
Handle GET requests for enhanced UI and status.
Source code in toolboxv2/mods/isaa/module.py
104 105 106 107 108 109 110 111 112 113 | |
do_OPTIONS()
¶
Handle preflight CORS requests.
Source code in toolboxv2/mods/isaa/module.py
310 311 312 313 314 315 316 | |
do_POST()
¶
Handle POST requests for enhanced API endpoints.
Source code in toolboxv2/mods/isaa/module.py
115 116 117 118 119 120 121 122 123 124 | |
log_message(format, *args)
¶
Override to reduce logging noise.
Source code in toolboxv2/mods/isaa/module.py
306 307 308 | |
EnhancedProgressTracker
¶
Enhanced progress tracker for detailed UI updates.
Source code in toolboxv2/mods/isaa/module.py
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 | |
extract_progress_data(event)
¶
Extract comprehensive progress data from event.
Source code in toolboxv2/mods/isaa/module.py
326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 | |
Tools
¶
Bases: MainTool, FileHandler
Source code in toolboxv2/mods/isaa/module.py
387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 | |
cleanup_tools_interfaces()
async
¶
Cleanup all ToolsInterface instances.
Source code in toolboxv2/mods/isaa/module.py
908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 | |
configure_tools_interface(agent_name, **kwargs)
async
¶
Configure the ToolsInterface for a specific agent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agent_name
|
str
|
Name of the agent |
required |
**kwargs
|
Configuration parameters |
{}
|
Returns:
| Type | Description |
|---|---|
bool
|
True if successful, False otherwise |
Source code in toolboxv2/mods/isaa/module.py
874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 | |
get_tools_interface(agent_name='self')
¶
Get the ToolsInterface instance for a specific agent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agent_name
|
str
|
Name of the agent |
'self'
|
Returns:
| Type | Description |
|---|---|
ToolsInterface | None
|
ToolsInterface instance or None if not found |
Source code in toolboxv2/mods/isaa/module.py
859 860 861 862 863 864 865 866 867 868 869 870 871 872 | |
host_agent_ui(agent, host='0.0.0.0', port=None, access='local', registry_server=None, public_name=None, description=None, use_builtin_server=None)
async
¶
Unified agent hosting with WebSocket-enabled UI and optional registry publishing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agent
|
Agent or Chain instance to host |
required | |
host
|
str
|
Host address (default: 0.0.0.0 for remote access) |
'0.0.0.0'
|
port
|
int | None
|
Port number (auto-assigned if None) |
None
|
access
|
str
|
'local', 'remote', or 'registry' |
'local'
|
registry_server
|
str | None
|
Registry server URL for publishing (e.g., "ws://localhost:8080/ws/registry/connect") |
None
|
public_name
|
str | None
|
Public name for registry publishing |
None
|
description
|
str | None
|
Description for registry publishing |
None
|
use_builtin_server
|
bool
|
Use toolbox built-in server vs standalone Python server |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, str]
|
Dictionary with access URLs and configuration |
Source code in toolboxv2/mods/isaa/module.py
1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 | |
init_from_augment(augment, agent_name='self')
async
¶
Initialize from augmented data using new builder system
Source code in toolboxv2/mods/isaa/module.py
498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 | |
list_hosted_agents()
async
¶
List all currently hosted agents.
Source code in toolboxv2/mods/isaa/module.py
1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 | |
publish_and_host_agent(agent, public_name, registry_server='ws://localhost:8080/ws/registry/connect', description=None, access_level='public')
async
¶
FIXED: Mit Debug-Ausgaben für Troubleshooting.
Source code in toolboxv2/mods/isaa/module.py
3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 | |
setup_live_progress_callback(agent, registry_client, agent_id=None)
async
¶
Enhanced setup for live progress callback with proper error handling.
Source code in toolboxv2/mods/isaa/module.py
3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 | |
stop_hosted_agent(agent_id=None, port=None)
async
¶
Stop a hosted agent by agent_id or port.
Source code in toolboxv2/mods/isaa/module.py
1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 | |
ui
¶
get_agent_ui_html()
¶
Produktionsfertige UI mit Live-Progress-Tracking.
Source code in toolboxv2/mods/isaa/ui.py
573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 | |
registry
¶
client
¶
RegistryClient
¶
Manages the client-side connection to the Registry Server with robust reconnection and long-running support.
Source code in toolboxv2/mods/registry/client.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 | |
cancel_execution(request_id)
async
¶
Cancel a running execution.
Source code in toolboxv2/mods/registry/client.py
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 | |
cleanup_completed_executions()
async
¶
Clean up completed execution tasks.
Source code in toolboxv2/mods/registry/client.py
351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 | |
connect(server_url, timeout=30.0)
async
¶
Connect and start all background tasks.
Source code in toolboxv2/mods/registry/client.py
370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 | |
disconnect()
async
¶
Enhanced disconnect with complete task cleanup.
Source code in toolboxv2/mods/registry/client.py
1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 | |
get_connection_status()
async
¶
Get detailed connection status information.
Source code in toolboxv2/mods/registry/client.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | |
get_diagnostics()
async
¶
Get comprehensive diagnostic information.
Source code in toolboxv2/mods/registry/client.py
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 | |
get_registered_agents()
async
¶
Get all registered agents information.
Source code in toolboxv2/mods/registry/client.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | |
get_running_executions()
async
¶
Get information about currently running executions.
Source code in toolboxv2/mods/registry/client.py
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | |
health_check()
async
¶
Perform a health check of the connection.
Source code in toolboxv2/mods/registry/client.py
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 | |
on(event_name, handler)
¶
Register an async callback function to handle a custom event from the server.
Source code in toolboxv2/mods/registry/client.py
627 628 629 630 | |
register(agent_instance, public_name, description=None)
async
¶
Register an agent with the server.
Source code in toolboxv2/mods/registry/client.py
745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 | |
send_agent_status(agent_id, status, details=None)
async
¶
Send agent status updates.
Source code in toolboxv2/mods/registry/client.py
1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 | |
send_custom_event(event_name, data)
async
¶
Send a custom event with a JSON payload to the server.
Source code in toolboxv2/mods/registry/client.py
632 633 634 635 636 637 638 639 640 641 642 643 644 | |
send_ui_progress(progress_data, retry_count=3)
async
¶
Enhanced UI progress sender with retry logic.
Source code in toolboxv2/mods/registry/client.py
998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 | |
get_registry_client(app)
¶
Factory function to get a singleton RegistryClient instance.
Source code in toolboxv2/mods/registry/client.py
1266 1267 1268 1269 1270 1271 | |
demo_custom_messaging
¶
setup_chain_with_live_updates()
async
¶
Example 3: Create agent chain with live progress broadcasting
Source code in toolboxv2/mods/registry/demo_custom_messaging.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | |
setup_complete_agent_system(local=False)
async
¶
Vollständiges Beispiel für Agent-System mit Live-Progress.
Source code in toolboxv2/mods/registry/demo_custom_messaging.py
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 | |
setup_multiple_live_agents()
async
¶
Example 4: Host multiple agents with individual live UIs
Source code in toolboxv2/mods/registry/demo_custom_messaging.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | |
demo_registry
¶
run_end_user_test()
async
¶
Simuliert einen externen Aufruf an die öffentliche API des Registry Servers.
Source code in toolboxv2/mods/registry/demo_registry.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | |
run_local_client()
async
¶
Startet die zweite toolboxv2-Instanz als lokalen Client, der einen Agenten hostet.
Source code in toolboxv2/mods/registry/demo_registry.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | |
run_registry_server()
async
¶
Startet die erste toolboxv2-Instanz als unseren öffentlichen Server.
Source code in toolboxv2/mods/registry/demo_registry.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |
server
¶
broadcast_to_ui_clients(app, data)
async
¶
Broadcast updates to all connected UI clients.
Source code in toolboxv2/mods/registry/server.py
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | |
handle_agent_status_update(app, message)
async
¶
Handle agent status updates.
Source code in toolboxv2/mods/registry/server.py
191 192 193 194 195 196 197 198 199 200 201 | |
handle_execution_error(app, message)
async
¶
Handle execution errors.
Source code in toolboxv2/mods/registry/server.py
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | |
handle_execution_result(app, message)
async
¶
Handle execution results.
Source code in toolboxv2/mods/registry/server.py
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | |
handle_registration(app, conn_id, session, message)
async
¶
Handle agent registration.
Source code in toolboxv2/mods/registry/server.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | |
handle_ui_progress_update(app, message)
async
¶
Handle UI progress updates.
Source code in toolboxv2/mods/registry/server.py
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | |
on_disconnect(app, conn_id, session=None)
async
¶
Enhanced disconnect handler with comprehensive cleanup and UI notifications.
Source code in toolboxv2/mods/registry/server.py
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | |
on_message(app, conn_id, session, payload)
async
¶
Enhanced message handler with proper error handling.
Source code in toolboxv2/mods/registry/server.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | |
register_ui_ws_handlers(app)
¶
Register UI-specific WebSocket handlers.
Source code in toolboxv2/mods/registry/server.py
416 417 418 419 420 421 422 423 | |
register_ws_handlers(app)
¶
Register WebSocket handlers for the registry.
Source code in toolboxv2/mods/registry/server.py
406 407 408 409 410 411 412 413 | |
run(app, public_agent_id, request)
async
¶
Public API endpoint to run agents.
Source code in toolboxv2/mods/registry/server.py
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 | |
ui(app, public_agent_id=None)
async
¶
Serve the interactive 3-panel agent UI.
Source code in toolboxv2/mods/registry/server.py
491 492 493 494 495 496 | |
ui_on_connect(app, conn_id, session)
async
¶
UI Client connection.
Source code in toolboxv2/mods/registry/server.py
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 | |
ui_on_disconnect(app, conn_id, session=None)
async
¶
UI Client Disconnection.
Source code in toolboxv2/mods/registry/server.py
400 401 402 403 | |
ui_on_message(app, conn_id, session, payload)
async
¶
UI Client Message Handler.
Source code in toolboxv2/mods/registry/server.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 | |
types
¶
AgentRegistered
¶
Bases: BaseModel
Server -> Client: Response after successful registration.
Source code in toolboxv2/mods/registry/types.py
14 15 16 17 18 19 | |
AgentRegistration
¶
Bases: BaseModel
Client -> Server: Payload to register a new agent.
Source code in toolboxv2/mods/registry/types.py
9 10 11 12 | |
ExecutionError
¶
Bases: BaseModel
Client -> Server: Reports an error during execution.
Source code in toolboxv2/mods/registry/types.py
35 36 37 38 | |
ExecutionResult
¶
Bases: BaseModel
Client -> Server: A chunk of the execution result (for streaming).
Source code in toolboxv2/mods/registry/types.py
29 30 31 32 33 | |
RunRequest
¶
Bases: BaseModel
Server -> Client: Request to execute an agent.
Source code in toolboxv2/mods/registry/types.py
21 22 23 24 25 26 27 | |
WsMessage
¶
Bases: BaseModel
A generic wrapper for all WebSocket messages.
Source code in toolboxv2/mods/registry/types.py
40 41 42 43 | |
talk
¶
TalkSession
¶
Bases: BaseModel
Represents the state of a single voice conversation session.
Source code in toolboxv2/mods/talk.py
24 25 26 27 28 29 30 31 32 33 34 | |
Tools
¶
Bases: MainTool
The main class for the Talk module, handling initialization, session management, and dependency loading.
Source code in toolboxv2/mods/talk.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | |
on_exit()
¶
Clean up resources, especially cancelling any active agent tasks.
Source code in toolboxv2/mods/talk.py
94 95 96 97 98 99 | |
on_start()
¶
Initializes the Talk module, its dependencies (ISAA, AUDIO), and UI registration.
Source code in toolboxv2/mods/talk.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |
api_open_stream(self, request, session_id)
async
¶
Opens a Server-Sent Events (SSE) stream for a given session ID.
Source code in toolboxv2/mods/talk.py
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | |
api_process_audio(self, request, form_data)
async
¶
Receives audio, transcribes it, and starts the agent processing task.
Source code in toolboxv2/mods/talk.py
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | |
api_start_session(self, request)
async
¶
Creates a new talk session for an authenticated user.
Source code in toolboxv2/mods/talk.py
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | |
get_main_ui(self, request)
¶
Serves the main HTML and JavaScript UI for the Talk widget.
Source code in toolboxv2/mods/talk.py
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 | |
toolboxv2.flows_dict(s='.py', remote=False, dir_path=None, flows_dict_=None)
¶
Source code in toolboxv2/flows/__init__.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | |
toolboxv2.TBEF
¶
Automatic generated by ToolBox v = 0.1.22